Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I do this in VFP (STDIO via FGETS)
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00087924
Message ID:
00087935
Views:
53
Paul,

I am not familiar at all with C, but I might try to shed some light on your problem:

You get the file handle from the open statement.

n= fopen(cfileName,nModeInfo)
cBuffer= fgets(n,nBufferlength)

I think that n is what you are missing in you construction.

Now stdio sounds awfully like keyboard input to me. I do not think you can
use low level functions here but have you looked at the inkey function?

Marc



>I'm trying to write a program that needs access to STDIO. Here's the C equivalent:
>
>#DEFINE MAX_LINE 4096
>char line [MAX_LINE];
>
>fgets( line, MAX_LINE, stdin );
>
> This is pretty straightforward, but it doesn't look like the VFP version of FGETS has a STDIO operator. I think I'm missing something really stupid...
>
> Here's what I think I'd need to do, if I could figure out how to pass a handle to STDIO in VFP:
>
>cLine = FGETS(STDIO,MAX_LINE)
>
>Ideas?
>
>-Paul

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Previous
Reply
Map
View

Click here to load this message in the networking platform