` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Hex to decimal conversion
1999-01-31 -- Lee White
 
Not sure if this is what you're looking for... Hex2Dec FUNCTION(? hString) lVal LONG,AUTO sPos BYTE,AUTO Correction BYTE,AUTO hCstring CSTRING(11),AUTO CODE hCstring = CLIP(hString) lVal = 0 Correction = CHOOSE(UPPER(SUB(hCstring,-1,1)) = 'H',1,0) LOOP sPos = 1 TO LEN(hCstring)-Correction lVal = lVal*16+(INSTRING(hCstring[sPos],'0123456789ABCDEF',1,1))-1 END RETURN(lVal) Probably better ways but this should get you started.


Today is November 21, 2024, 6:49 am
This article has been viewed 35205 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: