Author Topic: Is the syntax for this typedef incorrect?  (Read 2922 times)


  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Is the syntax for this typedef incorrect?
« on: February 26, 2007, 10:03:24 pm »
I'm a newbie to SlickEdit and am having some unusual difficulties with some C code I have to debug. 

I have a typedef, "typedef unsigned char  ByteT;   /* (8 bits) 0..255  */".  The code contains the following declaration in a function definition, "   ByteT ascii_byte, A_byte, ebcdic_byte;"  When I run the debugger and step into the function, the location pointer goes immediately to the line after the var declarations with this error, "Attempt to use a type name as an expression". 

I am not seeing what is wrong here.  There doesn't seem to be a reserved word of "ByteT". 

Any ideas, please?  I'm all out.  Thank you for your help.


  • Senior Community Member
  • Posts: 382
  • Hero Points: 14
  • I have nothing sufficiently witty to say.
Re: Is the syntax for this typedef incorrect?
« Reply #1 on: February 26, 2007, 10:50:42 pm »

Syntax looks fine. Please post the context of the line where the error occurs. i.e preceding and following few lines.