Re: Forth stdin and stdout
- From: jihtungpai@xxxxxxxxx
- Date: Thu, 15 Jan 2009 05:50:53 -0800 (PST)
To build a DOS version, run win32for.exe as normal and run the
following;
also vimage
cui to exetype
fsave w32fdos.exe
bye
This will create an executable called w32fdos.exe, which you can run
as usual. It will open a DOS console and a window. To create the
handles to the console;
s" CONOUT$" w/o create-file drop to stdout
s" CONIN$" r/o create-file drop to stdin
Now you can use stdin and stdout as usual with read-file and write-
file, or use redirects and pipes from the command line.
Parameters to Windows calls in Win32Forth are passed in reverse order.
Your printf example would be
1234 z" Number %d" call printf
What you mentioned including the printdf example worked for me.
However, I could not make the example of fprintf to work. Could you
show how to translate the following statement to Win32forth?
fprintf(stdout,"Number: %d", 1234);
Thanks!
.
- Follow-Ups:
- Re: Forth stdin and stdout
- From: Alex McDonald
- Re: Forth stdin and stdout
- From: Helmar
- Re: Forth stdin and stdout
- References:
- Forth stdin and stdout
- From: jihtungpai
- Re: Forth stdin and stdout
- From: Alex McDonald
- Forth stdin and stdout
- Prev by Date: Re: Forth stdin and stdout
- Next by Date: Re: Forth stdin and stdout
- Previous by thread: Re: Forth stdin and stdout
- Next by thread: Re: Forth stdin and stdout
- Index(es):
Relevant Pages
|