I'm not sure what you have changed, but the code you posted originally seems to be mixing up the notion of "array of characters" and "pointer to character". See my comment below:
program snchygrometer
%%#include <ctype.h> %%#include <stdlib.h> %%#include <stdio.h>
%%char rob[10] ; char *roba; assign roba to "rawdata" ; monitor roba ; float ch1 ; float ch2 ; float ch3 ; float ch4 ; float ch5 ; assign ch1 to "PV1"; assign ch2 to "PV2"; assign ch3 to "PV3"; assign ch4 to "PV4"; assign ch5 to "PV5";
int v ; float z ; %%extern char *wa1 ; %%char *sign="+-" ;
%{ rob=&roba <<<<<<<<<<<<< EVEN WITH A SEMICOLON AT THE END THIS LINE MAKES NO SENSE. v=rob[0]; /*Get first char from string*/ wa1=strpbrk(rob, "+-"); /*Break string at +-,rest is wa1*/ z=(float)wa1; /*convert string to float z*/ }%
Perhaps you could mail me your latest code?? -- Advanced Photon Source Argonne National Laboratory (630) 252-4793 |