The proper usage of quotations?

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

Joshjje
orc pawn
orc pawn
Posts: 18
Joined: Mon Oct 27, 2003 2:39 pm

The proper usage of quotations?

Post by Joshjje » Mon Oct 27, 2003 3:57 pm

OK from all the scripts ive seen, and from writing my own, i would like to hear others opinions, or rather facts on the proper usage of quotations. I have encountered a few errors from not using them in some places but i would like to know.

From what i understand it can be written many ways such as:

Code: Select all

/if $target()==FALSE

/if "$target()"==FALSE

/if $target()=="FALSE"

/if "$target()"=="FALSE"
There are a lot of other instances where qoutations might be needed, or might not im not totally sure when i should have to use them, and when i dont need them.[/quote]

Scrime
a ghoul
a ghoul
Posts: 86
Joined: Sun Sep 21, 2003 5:48 pm
Contact:

Post by Scrime » Mon Oct 27, 2003 4:01 pm

Use quotes whenever you might have the slightest, remotest chance that the string that you have contains a non-number, non-letter, non-underscore character (i.e. a space, a punctuation mark, etc).

AFAIK you can never go wrong using quotes, but you can certainly go wrong without them.
[url=http://www.catb.org/~esr/faqs/smart-questions.html]asking smart questions[/url]