Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Read .mem file using C
Message
From
13/03/2006 06:48:01
 
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
01099846
Message ID:
01103654
Views:
9
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform