07-13-2005 05:03 AM
07-14-2005 04:42 AM
07-14-2005 05:44 AM
Hi - ok I misread that - sorry CVI (not LabVIEW)
Code snippet attached :
#include <userint.h>
#include <ansi_c.h>
static unsigned int x = 65;
static unsigned char y;
y = (unsigned char)x;
// for showing the information only :
printf("X = %d, Y = %c",x,y);
Thanks
Sacha Emery
07-15-2005 02:47 AM
I tried your example, but the code would not compile, with warning errors starting at the line y = (unsigned char)x;
the error warnings were as below:
ascii.c - 5 errors,1 warning
7, 3 Redeclaration of 'y' previously declared at ascii.c:6.
7, 3 Warning: Inconsistent linkage for 'y' previously declared at ascii.c:6.
7, 21 Initializer must be constant.
7, 21 Too many initializers.
10, 8 syntax error; found 'string constant' expecting ')'.
10, 29 Redeclaration of 'printf' previously declared at stdio.h:194.
07-15-2005 03:41 AM
07-15-2005 03:54 AM
I am using Cvi version 6.
Also I opened your .zip file and there is no file/data in it to extract.
07-18-2005 09:17 AM
Hi,
I think you have greater issues than not being able to run the code then.
I checked the files are in there, and that they run ok. Do you have another computer with internet access that you can pull down the files with?
Do you have another PC with LabWindows/CVI that you can try the code snippet on I embedded in the previous message?
Thanks
Sacha Emery
National Instruments (UK)
08-04-2005 06:00 AM
08-05-2005 10:43 AM