CDATA Functions vs normal Functions?

I've been starting to look at the code of quest, and I'm noticing weird syntax behavior, mostly between functions right now, and I'm wondering why some will get <![CDATA[ added to it which changes how the syntax colors it. What's it meant to do and how is it different from a function without it?


Basically, CDATA is an XML thing. It basically means "The bit between <![CDATA[ and ]]> isn't XML". It tells the load/save engine to ignore anything inside the function, and pass it to the script engine as one piece.

This is only necessary if the script contains something that looks like it might be XML or HTML. I believe Quest adds them automatically to any function that contains < or > characters. They're basically just to make life easier for the bit of code that is responsible for loading files.


Log in to post a reply.

Support

Forums