If I have:
DownChrSet : SET OF CHAR; LowerT = '\C2'; DownChrSet := [LowerT];
I get the above error. Isn't Char an ordinal type though? And \C2, being a hex, fits into one char, so shouldn't this be ok?
Adam
----------------------------------------------------------------------- C. Adam Oldham Marconi Commerce Systems Inc. Software Engineer 7300 West Friendly Ave. adam.oldham@marconi.com Greensboro, NC 27420-2087 Phone : 336.547.5952 Fax : 336.547.5079 ----------------------------------------------------------------------- This document contains confidential information of Marconi Commerce Systems Inc. In consideration of the receipt of this document, the recipient agrees not to reproduce, copy, use or transmit this document and/or the information contained herein, in whole or in part, or to suffer such actions by others, for any purpose except with written permission, first obtained, of Marconi Commerce Systems Inc., and further agrees to surrender the same to Marconi Commerce Systems Inc. upon demand. -----------------------------------------------------------------------
Oldham, Adam wrote:
If I have:
DownChrSet : SET OF CHAR; LowerT = '\C2'; DownChrSet := [LowerT];
I get the above error. Isn't Char an ordinal type though? And \C2, being a hex, fits into one char, so shouldn't this be ok?
Remember the recent discussion about character escapes. To GPC (and any other compiler compatible to either Standard or Borland Pascal or both) '\C2' is not a char, it's a string consisting of the 3 characters '', 'C' and '2'.
To get what's '\xC2' in C, use one of the various forms GPC knows, e.g.:
Chr (16#C2) (EP) Chr ($C2) (BP) #$C2 (BP) "\xC2" (GPC extension -- in older versions you need {$char-escapes})
Frank