![]() |
What is the correct way to concatenate THIS_SCRIPT?
Hi all,
I've attempted to concatenate two THIS_SCRIPTs like this HTML Code:
<if condition="THIS_SCRIPT != 'subscription' or THIS_SCRIPT != 'search'"> Is that the correct way? --------------- Added [DATE]1333234232[/DATE] at [TIME]1333234232[/TIME] --------------- For some strange reason i changed it to this HTML Code:
<if condition="THIS_SCRIPT != 'subscription' AND THIS_SCRIPT != 'search'"> |
If you think about it, since it can't be both 'subscription' and 'search' at the same time it's always going to be != to one of them, so in your first example the condition will always be true.
|
Doh!, it was approaching midnight here when i was attempting it, thanks for the explanation.
|
I'm also going to add this has nothing to do with string concatenation- or any form of concatenating.
What you're doing is simple expression evaluating with comparison operators. And lastly, what exactly are you trying to do? :D |
Well, that depends how you read it, to concatenate means to link or join together, so yes it is concatenating as i wanted to "join" two THIS_SCRIPTs.
As for what i'm trying to acheive, i wanted to only show a variable for all pages except "subscription" and "search :) The second part of my message shows that i've done that, it was really late when i first posted, i then thought i'll just try the AND operator and it worked, i wasn't thinking too clearly at the time, KH99 pointed out why, i should have seen it really. |
Okay. Glad you got it worked out. But that's still not concatenation. ;)
|
Quote:
|
Quote:
I agree with that. What Pandemikk is talking about is string concatenation (which *is* what is normally meant by concatenation when you're talking programming) but that doesn't mean you couldn't use that word for what you're doing. I knew what you meant. Quote:
|
Quote:
|
All times are GMT. The time now is 10:36 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|