I wrote a testbed to show that Jeff’s information is correct.
PROGRAM
MAP
END
Q1 QUEUE
Str &CSTRING
END
Q2 QUEUE
Str &CSTRING
END
What:String4 STRING(4)
What:Long LONG,OVER(What:String4)
CODE
! Show it's too early for this work, as Q1.Str is NULL
What:String4 = WHAT(Q1, 1)
Q2.Str &= What:Long + 0
Q1.STR &= NEW CSTRING(42)
Q1.STR = 'Hi Dennis'
DO ShowValues
! now set Q2.Str to the referenc in Q1.Str
What:String4 = WHAT(Q1, 1)
Q2.Str &= What:Long + 0 ! + 0 turns this into an expression, so it's an address
DO ShowValues
Q1.STR = 'New Value'
DO ShowValues
! 1 2 3 4
!123456789-123456789-123456789-123456789-123456789-
Q1.STR = 'This is a longer value than the orig, and > 42'
DO ShowValues
ShowValues ROUTINE
MESSAGE('Q1.Str ['& Q1.Str &']' |
& '|Q2.Field['& Q2.Str &']' |
)
Bit late to the party, but stumbled on this code as I’m working on some generic code for GROUPs. Didn’t see a list of what the GetAnyDataType() function returns, i.e. the numeric value for the various data types. This is what I got:
BYTE 1
SHORT 2
USHORT 3
DATE 4
TIME 5
LONG 6
SIGNED 6
UNSIGNED 6
SIGNED 6
ULONG 7
REAL 9
DECIMAL(10,2) 10
PDECIMAL(10,2) 11
BFLOAT4 13
BFLOAT8 14
STRING(10) 18
GROUP 18
CSTRING(10) 19
PSTRING(10) 20
@hdsoftware (Ole Morten Heien) just pointed out that the CLType equates found in SV’s shipping XMLTypes.inc match up to the DataType: equates found in equates.clw
What’s interesting to me is CLType:Reference EQUATE(31) AND several more data types yet.