QB64.org Forum
Active Forums => QB64 Discussion => Topic started by: NOVARSEG on March 08, 2021, 03:23:22 am
-
DIM A(3) as integer
DIM B AS STRING * 8
GET #1 ,, B
A() = B
or
B = A()
PUT #1,, B
****
Been lookin at EXEs with hex editor to see what can do
-
DIM A(3) AS INTEGER
DIM B AS STRING
DIM TempMem AS _MEM: _TtempMem = _MEM(A)
Array2String TempMem, B
‘Your array is now in your string
‘Do stuff
String2Array B, TempMem
‘Your string is now your array
SUB Array2String (M AS _MEM, S AS STRING)
S = SPACE$(M.SIZE)
_MEMGET M, M.OFFSET, S
END SUB
SUB String2Array (S AS STRING, M AS _MEM)
_MEMPUT M, M.OFFSET, S
END SUB
-
ya the mem stuff does work too
-
What is this for?
-
What is this for?
I think it’s to put an array into a string, and vice-versa, so you can GET/PUT with a single pass.
-
Oh ok. Sounds like it could be useful