引数のある関数
#include <oxstd.h> fTest1(const x){ decl y; y=x;println("(2) x=",y); } fTest2(const adX){ println("(4) x=",adX[0]);adX[0]=1;println("(5) x=",adX[0]); } main(){ decl x; x=0;println("(1) x=",x); println("Function without using address"); fTest1(x);println("(3) x=",x); // println("Function using address"); fTest2(&x);println("(6) x=",x); }
出力結果
(1) x=0 Function without using address (2) x=0 (3) x=0 Function using address (4) x=0 (5) x=1 (6) x=1