blog
blog copied to clipboard
Using printf (from free-format)
The printf function in C is very useful when starting to develop new programs. I'm not a big fan of using DSPLY.. and I've found something I much prefer! The printf function inside of your RPG programs.
Firstly, we must declare our prototype at the top of our program:
Dcl-Pr printf Int(10) ExtProc('printf');
format Pointer Value Options(*String);
END-PR;
Then we can use it like so:
printf('testing!!!');
*Inlr = *on;
Return;
The result is this, look how pretty it is: