Consultor Eletrônico



Kbase 12967: example of using input-output through with C code
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
example of using input-output through with C code

Here is an example of using input-output through with C code

def var pat as char format "x(10)".
input-output through p value(pat) unbuffered.
export pat.
set pat.
output close.
display pat.
input close.
input-output close.

The corresponding C code is as follows:
#include <stdio.h>
main(argc,argv)
int argc;
char *argv[];
{
char *pat[10];
setbuf(stdout, (char *) NULL);
{
if (argc < 2)
{
strcpy(&pat,"xyz");
printf("%s\n",&pat);
return(pat);
}
strcpy(&pat,argv[1]);
fprintf(stderr, "%s\n",pat); }}


This code will output to a C program and the input information back
into PROGRESS.

Progress Software Technical Support Note # 12967