Skip to content
Low-level programming · Higher-level thinking
Login Register
Forum / Bugs and Fixes

Different results depending on the OS

A community discussion post from the original code:zIRON forum.

0CodErr member
Posts
201
Threads
37
Location
Unknown

Different results depending on the OS

program PE32_CUI 'Test';
#include 'platform_def.zir';
#include 'console.zir';

const BUFLEN = 100;
char buf[BUFLEN];

print 'Enter something:';
gets(@buf, sizeof buf);
println 'You entered: "', buf, '"';

wait_key();
ExitProcess(0);

Result:

program KOLIBRI32 'Test';
#include 'platform_def.zir';
#include 'console.zir';

const BUFLEN = 100;
char buf[BUFLEN];

print 'Enter something:';
gets(@buf, sizeof buf);
println 'You entered: "', buf, '"';

wait_key();
ExitProcess(0);

Result: