You need to pass 'myttype' by reference;
FCONTROL(stdinx, 39, &myttype);
HTH,
Bill
HP/CSY
> I've been contemplating converting a moderate-sized application written
> mostly in SPL to c. I figured it would also be a good way to force myself to
> learn c in the process. The application uses the system intrinsics a lot so
> I thought I would first make sure I knew how to call the system intrinsics
> from c. The following trivial-seeming code has me stumped. What am I
> missing? The third parameter in the fcontrol call is defined in the manual
> as U16.
>
> 1 0 # 1 "FCONTROL.SRCCTEST.SYSADMIN"
> 1 0 #pragma intrinsic FOPEN MPE_FOPEN, FCONTROL, FCLOSE
> 2 0
> 3 0 void gettermtype()
> 4 0 {
> 5 1 unsigned short int stdinx;
> 6 1 unsigned short int myttype;
> 7 1
> 8 1 stdinx = MPE_FOPEN("$STDINX", 045);
> 9 1 FCONTROL(stdinx, 39, myttype);
> 10 1 FCLOSE(stdinx, 0, 0);
> 11 1 }
> cc: "FCONTROL.SRCCTEST.SYSADMIN", line 9: error 1620: Argument 3 is not the
> correct type.
> 12 0
>
> John
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|