summaryrefslogtreecommitdiff
path: root/t/extern.pas
diff options
context:
space:
mode:
Diffstat (limited to 't/extern.pas')
-rw-r--r--t/extern.pas13
1 files changed, 10 insertions, 3 deletions
diff --git a/t/extern.pas b/t/extern.pas
index 0b78e45..a23c371 100644
--- a/t/extern.pas
+++ b/t/extern.pas
@@ -7,9 +7,16 @@ extern __isoc99_scanf(s:string, ...):integer;
function main():integer;
var
buf:array[0..1023] of char;
+ i:integer;
begin
puts('Hello, World!');
- printf('Variadic Function Test: %d, %s, %x\nsay something:', 1, 'yes', 0x12345678);
- __isoc99_scanf('%s', @buf);
- printf('you said: %s\n', @buf)
+ printf('Variadic Function Test: %d, %s, %x\n', 1, 'yes', 0x12345678);
+ for i:=0 to 10 do
+ begin
+ if i=3 then continue;
+ if i=5 then break;
+ printf('say something: ');
+ __isoc99_scanf('%s', @buf[0]);
+ printf('round %d you said: %s\n', i, @buf[0])
+ end;
end;