Search - User list
Full Version: What's the difference, " or '
Root » Houdini Lounge » What's the difference, " or '
dompla
Does it matter if I use " or ' for VEX and Hscript? Both works but for sheer curiosity, I would like to clarify the difference.
N-G
These single quote and double quotes are referred to C/C++ language where single quote is used for single character and the other one is used for multiple characters.
for example:
char sinleChar = 'A';
char multiChar[] = "Hello World";
There's not much differences between them in both VEX and Hscript unless in rare situations where you are dealing with nested strings for instance:
printf("%s", "'Houdini is the best!'");
Which prints:
'Houdini is the best!'
In this case single quotes are included in the string.
But if you try this:
printf("%s", ""Houdini is the best!"");
Houdini gives you an error!
Hope this helps!
dompla
N-G
These single quote and double quotes are referred to C/C++ language where single quote is used for single character and the other one is used for multiple characters.
for example:
char sinleChar = 'A';
char multiChar = "Hello World";
There's not much differences between them in both VEX and Hscript unless in rare situations where you are dealing with nested strings for instance:
printf("%s", "'Houdini is the best!'");
Which prints:
'Houdini is the best!'
In this case single quotes are included in the string.
But if you try this:
printf("%s", ""Houdini is the best!"");
Houdini gives you an error!
Hope this helps!


Perfect, thank you
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB