#75065 - 2003-05-20 06:55 PM
I am missing something here...
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
I know this has been asked a million and one times.
But, here goes:
code:
cls break on ?@kix DIM $tst,$tst2,$tst3 $tst=val(1) $tst2=val(3) $tst3=$tst/$tst2 ?$tst3 get $
I need to see .333.. I have also tried using CLNG, LONG, etc.
Thanks,
Kent
|
|
Top
|
|
|
|
#75067 - 2003-05-20 07:02 PM
Re: I am missing something here...
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
|
|
Top
|
|
|
|
#75069 - 2003-05-20 08:05 PM
Re: I am missing something here...
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Jooel,
Comes out as 0.
Kent
|
|
Top
|
|
|
|
#75075 - 2003-05-20 11:12 PM
Re: I am missing something here...
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Well..
Here it is..
Playing around this afternoon we see: code:
$tst=1 $tst2=3 $tst3=(0.+$tst)/$tst2 ? $tst3 $tst3=cdbl($tst3)*100 ? $tst3 $tst3=split($tst3,'.')[0]+'.'+left(split($tst3,'.')[1],2) ? $tst3 get $
And, we could expand on this: code:
CLS BREAK ON COLOR g+/n $script='pu.kix' ?'Press anykey to start test (open '+$script+', READ & display lines, CLOSE..' GET $x $result=1 IF exist('@scriptdir\'+$script) $result=open(1,'@scriptdir\'+$script) ELSE BEEP ? "Sorry, pu.kix appears to be missing." SLEEP 3 EXIT ENDIF
$maxi=1 $i=1 IF $result = 0 $maxline = readline(1) WHILE @error = 0 $maxline $maxline = readline(1) $maxi=$maxi+1 LOOP $result=close(1) $maxi=cdbl($maxi-1) ENDIF
$i=cdbl($i) $result = open(1,'@scriptdir\'+$script) IF $result = 0 $line = readline(1) WHILE @error = 0 $pct=cdbl(($i/$maxi)*100) IF len(split($pct,'.')[1])>2 $pct=LEFT($pct,5) ENDIF COLOR w/n ?'Line '+$i+'/'+$maxi+' read of '+$pct+'% done: [' COLOR w+/n $line COLOR w/n ']' $line=readline(1) $i=$i+1 LOOP $result=close(1) ELSE BEEP ?'Sorry, failed to open '+$script+', errorcode : ['+@error+']' ENDIF GET $
Cheers!
Kent
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 1046 anonymous users online.
|
|
|