String size
#6

Quote:
Originally Posted by AiRaLoKa
Посмотреть сообщение
that's why i asked it here -_-
i'm in doubt is it counted as one cell or two, becouse it's tabulate. And the other like \n (new line) is it counted one cells too?
A tab char is one byte, so no matter what Pawn's cell size, it needs to be able to output the tabular byte.

However, the newline character is actually a special case. When writing \n (LF - Line Feed) to a text file, it could be converted to \r\n (CRLF- Carriage Return, Line Feed) on Windows, because that is the actual character needed to start a new line. So in that case, \n would be compiled down to two bytes - though, it's not really something for you to worry about as it doesn't actually happen until output to the actual file.

I'm actually taking this knowledge from C/C++, but Pawn should follow a similar method in order to be a portable solution across multiple operating systems.


Now, what do you mean when you say "and i want to waste my memory"? I believe you could do that quicker by making your function call itself indefinitely
Reply


Messages In This Thread
String size - by AiRaLoKa - 06.06.2014, 08:47
Re: String size - by RenovanZ - 06.06.2014, 08:51
Re: String size - by AiRaLoKa - 06.06.2014, 08:53
Re: String size - by RenovanZ - 06.06.2014, 08:58
Re: String size - by polander - 06.06.2014, 09:02
Re: String size - by Deji - 06.06.2014, 09:04
Re: String size - by AiRaLoKa - 06.06.2014, 09:06
Re: String size - by RenovanZ - 06.06.2014, 09:08
Re: String size - by AiRaLoKa - 06.06.2014, 09:09
Re: String size - by Deji - 06.06.2014, 09:14

Forum Jump:


Users browsing this thread: 1 Guest(s)