Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Conversão COMP-3 (HP)
Message
From
30/03/2007 22:33:03
 
 
To
29/03/2007 12:11:36
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2003 Server
Miscellaneous
Thread ID:
01209200
Message ID:
01210667
Views:
13
>--------------------------
>Registros
>--------------------------
>    2412X             9909                  AA  3523650390990924ADIREC            0101        € 0958q [                  002759  58554901990924 0
>    2412X             9909                  AA  3523650390990927ADIREC            0101          1047Ϩ                  002762  58602001990927 0
>    /2412X             9909                  AA  3523650390990927ADIREC            0101          1059|s                  002760  58602905990927 0
>--------------------------
Oi Eduardo.. Postei a sua dificuldade no forum em inglês e obtive resposta do Dragan.. Testei aqui e funcionou bem..
a = "    /2412X             9909                  AA  3523650390990927ADIREC            0101          1059|s                  002760  58602905990927 0"
? Bcd2Num(SUBSTR(a,95,5))
**
** a resposta obtida foi -202007202
**
Func Bcd2Num
para bcd
priv x
x=''
#define tbl1 ':;<=>?'
#define tbl2 'abcdef'
for i=1 to len(bcd)
	_asc = asc(subs(bcd,i))
	x=x+chr(bitRshift(_asc,4)+48)+chr(bitand(_asc,15)+48)
endf
x=chrtran(x,tbl1,tbl2)
retu val(left(x,len(x)-1)) * iif(inlist(right(x,1),'c','f'),1,-1)
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20
Previous
Reply
Map
View

Click here to load this message in the networking platform