What's the difference, " or '
1800 2 0- dompla
- Member
- 28 posts
- Joined: Jan. 2014
- Offline
- N-G
- Member
- 209 posts
- Joined: March 2018
- Offline
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:
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:
Which prints:
In this case single quotes are included in the string.
But if you try this:
Houdini gives you an error!
Hope this helps!
for example:
char sinleChar = 'A'; char multiChar[] = "Hello World";
printf("%s", "'Houdini is the best!'");
'Houdini is the best!'
But if you try this:
printf("%s", ""Houdini is the best!"");
Hope this helps!
Edited by N-G - Sept. 10, 2019 08:19:27
- dompla
- Member
- 28 posts
- Joined: Jan. 2014
- Offline
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: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:char sinleChar = 'A'; char multiChar = "Hello World";Which prints:printf("%s", "'Houdini is the best!'");In this case single quotes are included in the string.'Houdini is the best!'
But if you try this:Houdini gives you an error!printf("%s", ""Houdini is the best!"");
Hope this helps!
Perfect, thank you
-
- Quick Links