Help with Variable Conversion and Saving
TurnipTruck
Posts: 1,485
Greetings,
I am trying to save an integer array onto flash.
I do not get the values returned to my array.
Any suggestions appreciated. Thanks.
I am trying to save an integer array onto flash.
VOLATILE INTEGER nLINK_DEVS[250][15] CHAR cLINK_DEVS[50000] VOLATILE SLONG snReturnEncode VOLATILE SLONG snFileOpen VOLATILE SLONG snFileSave VOLATILE SLONG snFileClose VOLATILE SLONG snFileRead //This is how I am saving: snReturnEncode=VARIABLE_TO_STRING(nLINK_DEVS,cLINK_DEVS,1) snFileOpen=FILE_OPEN('linkdevs.bin',2) snFileSave=FILE_WRITE(snFileOpen,cLINK_DEVS,LENGTH_STRING(cLINK_DEVS)) snFileClose=FILE_CLOSE(snFileOpen) //This is how I am restoring: snFileOpen=FILE_OPEN('linkdevs.bin',1) snFileRead=FILE_READ(snFileOpen,cLINK_DEVS,MAX_LENGTH_STRING(cLINK_DEVS)) snFileClose=FILE_CLOSE(snFileOpen) snReturnEncode=STRING_TO_VARIABLE(nLINK_DEVS,cLINK_DEVS,1)
I do not get the values returned to my array.
Any suggestions appreciated. Thanks.
0
Comments
Jeff