Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Read .mem file using C
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
01099846
Message ID:
01103654
Vues:
10
This message has been marked as a message which has helped to the initial question of the thread.
>Hi Sergey
>
>>Check Structure of 'Save To' mem file File #15242.
>
>Thanks for your ref. I have checked out the file but as I am using VFP6 the command which I presume will work in VFP6+ is CharToBin().
>
>Is there a VFP6 funtional equivalent to CharToBin()?
>
>Please advise.

Got this
function CharToBin(word)
	
	do case
	case len(m.Word) = 4
		return asc(m.Word)  + bitlshift(asc(substr(m.word,2,1)),8) + bitlshift(asc(substr(m.word,3,1)),16) + bitlshift(asc(substr(m.word,4,1)),24)
	
	case len(m.Word) = 2
		return asc(m.Word)  + bitlshift(asc(substr(m.word,2,1)),8)
		
	otherwise
		assert FALSE
		return FALSE
	
	endcase
endfunc
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform