Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using printf (from free-format) #15

Open
worksofliam opened this issue Jul 7, 2019 · 0 comments
Open

Using printf (from free-format) #15

worksofliam opened this issue Jul 7, 2019 · 0 comments
Labels
ilerpg ILE RPG topics

Comments

@worksofliam
Copy link
Owner

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:
image

@worksofliam worksofliam added the ilerpg ILE RPG topics label Jul 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ilerpg ILE RPG topics
Projects
None yet
Development

No branches or pull requests

1 participant