Article View: comp.sys.amiga.tech
Article #9994Reading and writing to CON: windows
From: Lee Sailer
Date: Mon, 10 Oct 1988 19:59
Date: Mon, 10 Oct 1988 19:59
30 lines
1150 bytes
1150 bytes
/*
I want to open a window on the WorkBench screen and use it for
simple, old-fashioned input and output ala stdin and stdout. I
have tried various versions of the code below, without success.
This particular version writes the "Enter string:" OK , but then
immediately adds "you typed ::" before I get a chance to type anything.
So, how do I open a CON: for read and write? Or more politely, can someone
point me at the info I need. I have Adler ,Peck, and the Lattice manual,
plus the usual Unix white books.
Thanks.
*/
#include <stdio.h>
main()
{
FILE *fp;
char fspec[80];
fp = fopen("con:10/10/550/50/test input","r+");
fprintf(fp,"Enter string: ");
fgets(fspec,80,fp);
fprintf(fp, "you typed :%s:\n", fspec);
Delay(600);
fclose(fp);
}
Technical Details
Message-ID:
<56741UH2@PSUVM>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!super!udel!gatech!psuvax1!psuvm.bitnet!uh2Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!super!udel!gatech!psuvax1!psuvm.bitnet!uh2 From: UH2@PSUVM.BITNET (Lee Sailer) Newsgroups: comp.sys.amiga.tech Subject: Reading and writing to CON: windows Message-ID: <56741UH2@PSUVM> Date: 10 Oct 88 19:59:38 GMT Organization: Penn State Erie, Behrend College Lines: 29