bob@accuvax.nwu.edu (Bob Hablutzel) (01/26/89)
[ stuff deleted ] > If I give the variable name in the Observe window (say, "test" > where "test : set of 0..15") LSP complains with "Bad expression type". > If I specify "INTEGER(test)" it snorts "Bad type cast" even though > "sizeof(test) = sizeof(INTEGER) = 2". I get a similar error if I try > to do the type cast within the Instant window or within a program. > In order to see the bit pattern for "test" I finally resorted to the > old un-tagged variant trick. I think that the problem is you need to define a type (testtype = set of 0..15) and then define test as this type (test : testtype). Pascal has problems with variables defined as type constructors, as opposed to types, if you get what I mean. (Example: they would be hard to pass as variables to procedures; you cannot pass a variable defined as "set of 0..15" to a procedure expecting "set of 0..15", although you can pass a testtype variable to a procedure expecting testtype.). Of course, I don't have LSP, so I could just be displaying my ignorance. This has _never_ stopped me before. :-) > Herb Poppe NCAR INTERNET: hpoppe@scdpyr.UCAR.EDU > (303) 497-1296 P.O. Box 3000 CSNET: hpoppe@ncar.CSNET > Boulder, CO 80307 UUCP: hpoppe@scdpyr.UUCP Bob Hablutzel Wildwood Software BOB@NUACC.ACNS.NWU.EDU