Comments inside strings
#3

Quote:
Originally Posted by MP2
Посмотреть сообщение
Is it possible to put comments inside strings? I want to make a list of models in a string like so:

pawn Код:
new gVehModel_Motorbike[] = {
462, // Faggio
581, // BF-400
461, // PCJ-600
521, // FCR-900
463, // Freeway
586 // Wayfarer
Obviously that's not a string but an array, I'd like to make it a string without losing the coments so I know which vehicle is which.
Is there a way?
Strings are arrays.

pawn Код:
new string[] = "Hello";
new string2[] = {'H', 'E', 'L', 'L', 'O', '\0'};
^Same thing btw.

Erm, to answer your question. If you mean something like this:

pawn Код:
new string[] = "Hello //Comment"
Nope, when wrapped EVERYTHING is part of the string, with the exclusion of character sequences such as the null terminator and newline but you get what i mean.
Reply


Messages In This Thread
Comments inside strings - by MP2 - 27.06.2012, 16:23
Re: Comments inside strings - by Vince - 27.06.2012, 16:27
Re: Comments inside strings - by Gh05t_ - 27.06.2012, 16:28
Re: Comments inside strings - by MP2 - 27.06.2012, 16:32
Re: Comments inside strings - by Britas - 27.06.2012, 16:36
Re: Comments inside strings - by MP2 - 27.06.2012, 16:43
Re: Comments inside strings - by Gh05t_ - 27.06.2012, 16:48
Re: Comments inside strings - by Roko_foko - 27.06.2012, 16:52
Re: Comments inside strings - by MP2 - 27.06.2012, 17:13
Re: Comments inside strings - by Gh05t_ - 27.06.2012, 17:35
Re: Comments inside strings - by Mauzen - 27.06.2012, 18:47
Re: Comments inside strings - by MP2 - 28.06.2012, 02:35

Forum Jump:


Users browsing this thread: 1 Guest(s)