August 20, 200421 yr Commercial Member Ok, I'm a bit stumped.This code:if (HSI_STATION_NAMEvar.var_value.p) { strcpy(hsi_station_name,HSI_STATION_NAMEvar.var_value.p); }...crashes.Any "C" gauges gurus have a suggestion or know what I'm doing wrong? Ed Wilson Mindstar AviationMy Playland - I69
August 20, 200421 yr What variable type is "hsi_station_name"?Long time ago, but I used sprintf(pelement->string,"%s",HSI_STATION_NAMEvar.var_value.d); the last time I printed IDs to ELEMENT_STRINGsArne Bartels
August 20, 200421 yr Author Commercial Member hsi_station_name is:char hsi_station_name;Why did you use var_value.d?? Isn't that d representing BCD? Ed Wilson Mindstar AviationMy Playland - I69
August 20, 200421 yr At least char hsi_station_name[5]="";four digits+trailing zero. A char is only one char and the average ID is longer then one char. ...var_value.d or ...var_value.p doesn't make much difference, both works, but .p might be more logical. Actually all var_value.... behave the same with the exception of var_value.n.Arne Bartels
August 21, 200421 yr Author Commercial Member Yep... thanks Arne... thought my feeble mind had missed something. ;)I don't do a whole lot of C programming, almost all my work is in the Delphi area... so I tend to 'forget' how to use C from time to time. LOL Ed Wilson Mindstar AviationMy Playland - I69
Create an account or sign in to comment