PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Question on a structure string  (Read 986 times)

Peter.Higgins

  • Diamond Member
  • *****
  • Posts: 124
    • View Profile
Question on a structure string
« on: September 16, 2020, 10:34:34 AM »
Curious why the following is true for parsing a FIB record?
Version 17,  1410-664

DIM cFibRec$::"RecordCnt:C(3),Name:C(6),Format:C(1),ExternalKey:C(1),MaxRecs:C(3),RecordSize:C(2),KeyedFileFlg:C(1),threshold:C(1),FileType:C(1),ExternalHandle:C(1),Unusedfields:C(4),Path:C(60),KeySegments:C(384)"

This works to parse the record.
X$=FIB(WRK)
cFibRec$=X$

This does not work.
cFibRec$=FIB(WRK)
Anyone know?

EVa

  • Gold Member
  • ****
  • Posts: 54
    • View Profile
    • EDIAS
Re: Question on a structure string
« Reply #1 on: September 17, 2020, 03:21:55 AM »
What do you mean by "This does not work" - are you getting an error or does cfibrec$ remain empty or ... ?

-Eric-

Peter.Higgins

  • Diamond Member
  • *****
  • Posts: 124
    • View Profile
Re: Question on a structure string
« Reply #2 on: September 17, 2020, 01:57:55 PM »
Hi Eric,
Missed you at Direxions! 
What was meant is the result was not a structure, just a string.   
Yesterday same environment gave consistent negative results with a direct assignment.
Today I retest same code both ways, and voila, it works both ways. 
:o