i luffs yeww
2010-02-28 20:26:36
Well it seems as though semi colors are kinda bugged?
program new;
begin;;;;;
if(7=7)then;;;;
Writeln('wat');;;;;;
end.
That works just fine.
I dunno, just seemed odd.
TRiLeZ
2010-02-28 21:55:41
It works fine with SCAR also… hmm…
i luffs yeww
2010-02-28 21:58:40
It shouldn't, though, right? mainly the if..then and begin. I thought those were pretty specific that you can't have semi colons there.
Wizzup?
2010-03-01 05:29:58
The semicolons after the then render it useless. Seems the opposite happens though:
Compiled succesfully in 32 ms.
wat
Successfully executed.
Baked0420
2010-03-01 06:29:22
yea, the semicolons after the then most likely make the if/then not do anything, and then the compiler just reads the writeln even if the if statement is false, not 100% positive, I didn't test, but it most likely will writeln wat no matter what.
EDIT: Yep, I just tested it with if(7=7) and got it to write wat and then if(7=8) and it still writes wat, so that if/then is working like it's supposed to, you made it seem like it was writeln'ing when it wasn't supposed to, at least that's how I took it anyway, but it seems fine to me.
mixster
2010-03-01 13:20:42
Logic would state that it would run it as an "empty" statement, much like you can do in other languages.
begin
if (7=7) then
;
;
;
;
Writeln('wat)';
;
;
;
end.
So it would come out something like ^
mixster
2010-03-01 14:01:12
Based on what Baked said it does :(
begin
if (7=7) then
;
Writeln('7=7?');
if (7=8) then
;
Writeln('7=8?');
end.
Compiled succesfully in 25 ms.
7=7?
7=8?
Succesfully executed
mastaraymond
2010-03-01 14:08:24
Get yo semi-colons right!
Baked0420
2010-03-01 16:37:32
From: Wizzup?
But it doesn't.
the script I ran wrote wat, so it did for me…
Wizzup?
2010-03-01 16:41:06
From: Baked0420
the script I ran wrote wat, so it did for me…
I think you missed my point. The way mixster formatted it is not how pascalscript sees it. That's how C would see it.
i luffs yeww
2010-03-01 18:31:10
Ohh.. :) I see. That makes sense.