program procedureDemo;
#include ("stdlib.hhf")
static
inputString: string;
procedure sayHelloWorld( hello:string );
begin sayHelloWorld;
stdout.put("hello, ", hello, nl);
end sayHelloWorld;
begin procedureDemo;
str.alloc( @size(char) * 80 );
mov(eax, inputString);
stdout.put("What's your name: ");
stdin.readLn();
stdin.gets( inputString );
stdin.flushInput();
sayHelloWorld( inputString );
str.free( inputString );
end procedureDemo;
HLA中的函數及調用
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.