SA-MP Forums Archive
pragma semicolon - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: pragma semicolon (/showthread.php?tid=94763)



pragma semicolon - ilikepie2221 - 31.08.2009

Hi there. I was just reading through the pawn-lang.pdf, and I noticed a certain function: #pragma semicolon It said that when the value's set to 0 like #pragma semicolon 0, you don't have to use semicolons on one line functions, like instead of:

pawn Код:
if(pie == 1)
{
  SomeFunction(playerid);
}
you can do

pawn Код:
if(pie == 1) SomeFunction(playerid)
I was just wondering, what would be the advantages and disadvantages of this?



Re: pragma semicolon - Westie - 31.08.2009

Setting semicolon to zero (as I always do) has no disadvantages. It's technically (more) valid PAWN seeing how all the tutorials are all written in colon-less expressions. Now if there was a pragma to make it as similiar to the lang.pdf, where you can do:

pawn Код:
main()
{
  printf "%s", "hai"
}