printf() function

Doug Easterbrook doug at artsman.com
Wed Mar 2 16:01:54 UTC 2022


hi Xavier


Standard out is a typical unix place to send messages.   I got a better description online for oyu


Stdout, also known as standard output, is the default file descriptor where a process can write output. In Unix-like operating systems, such as Linux, macOS X, and BSD, stdout is defined by the POSIX standard. Its default file descriptor number is 1. In the terminal, standard output defaults to the user's screen.



if you are running a headless version of omnis from a command line, ‘printf’ would send the output to the terminal so you can see whats going on — kind of like writing logs.

you can also assign STDOUT to a physical file (in a bash script), so if you assign STDOUT to a file like ‘logfile’, then you can see all the interactions to the ‘logfile’ for every printf issued.

helpful in tracing whats gong on in non visual instances of omnis being used as a server.


you might want to set STDOUT to  ~/Library/Logs/[yourfolder]/logfilenameYYMMDD. etc



thats what it looks like from the description.   I haven’t used it since we make our own log files else where (from before this might have been a command).


hope that gives some ideas.


Doug Easterbrook
Arts Management Systems Ltd.
mailto:doug at artsman.com
http://www.artsman.com
Phone (403) 650-1978

> On March 2, 2022, at 12:53 AM, IT <it at plastipol.com> wrote:
> 
> 
> Does anyone know what the printf() function can be used for? Its's only for macOS and Linux. From the documentation and my testings I'm unable to understand it practical use. 
> 
> printf()
> 
> Syntax
> 
> printf(string[,newline=ktrue])
> 
> Description
> 
> Writes the string to standard output followed by a newline character if required (the function is ignored on Windows. Executes on macOS and Linux only).
> 
> 
> regards
> 
> xavier
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 



More information about the omnisdev-en mailing list