Hello friends,
Is there a Harbour function to save a HASH to a file and then read it back in.
Best regards,
Otto
local hPost
//memowrit( "c:\www\htdocs\booking_new1\room.txt", hb_jsonencode( hPairs ) )
hb_jsondecode( memoread( "c:\www\htdocs\booking_new1\room.txt" ), @hPost )
Otto wrote:Dear Antonio,
This is real time support from you.
Thank you very much.
There is no better forum and programming community than this.
HB_MEMOWRIT( cFile, HB_ValToExp( hHash ) )
// Reading back
hHash := &( MEMOREAD( cFile ) )
#include "fivewin.ch"
function Main()
local hHash1, hHash2, cJson, cHash
SET DATE GERMAN
SET CENTURY ON
hHash1 := { "date" => Date() }
cJson := hb_jsonEncode( hHash1 )
hb_jsonDecode( cJson, @hHash2 )
? hHash1[ "date" ], ValType( hHash1[ "date" ] ), ;
hHash2[ "date" ], ValType( hHash2[ "date" ] )
hHash1 := { "date" => Date() }
cHash := hb_ValToExp( hHash1 )
hHash2 := &cHash
? hHash1[ "date" ], ValType( hHash1[ "date" ] ), ;
hHash2[ "date" ], ValType( hHash2[ "date" ] )
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 93 guests