[gforth] / gforth / kernel / int.fs  

gforth: gforth/kernel/int.fs

Diff for /gforth/kernel/int.fs between version 1.108 and 1.109

version 1.108, Wed Dec 8 11:56:30 2004 UTC version 1.109, Wed Dec 8 12:47:30 2004 UTC
Line 104 
Line 104 
 \ number? number                                       23feb93py  \ number? number                                       23feb93py
   
 hex  hex
 const Create bases   0A , 10 ,   2 ,   0A , 100 ,  const Create bases   0A , 10 ,   2 ,   0A
 \                    10   16     2     10   character  \                    10   16     2     10
   
 \ !! protect BASE saving wrapper against exceptions  \ !! protect BASE saving wrapper against exceptions
 : getbase ( addr u -- addr' u' )  : getbase ( addr u -- addr' u' )
Line 114 
Line 114 
     base @ #33 < and if      base @ #33 < and if
         hex 2 /string          hex 2 /string
     endif      endif
     over c@ [char] # - dup 5 u<      over c@ [char] # - dup 4 u<
     IF      IF
         cells bases + @ base ! 1 /string          cells bases + @ base ! 1 /string
     ELSE      ELSE
Line 128 
Line 128 
     THEN      THEN
     r> ;      r> ;
   
   : s'>unumber? ( addr u -- ud flag )
       \ convert string "C" or "C'" to character code
       dup 0= if
           false exit
       endif
       over c@ >r
       1 /string s" '" 2swap string-prefix?
       r> 0 rot ;
   
 : s>unumber? ( addr u -- ud flag )  : s>unumber? ( addr u -- ud flag )
       over c@ '' = if
           1 /string s'>unumber? exit
       endif
     base @ >r  dpl on  getbase      base @ >r  dpl on  getbase
     0. 2swap      0. 2swap
     BEGIN ( d addr len )      BEGIN ( d addr len )


Generate output suitable for use with a patch program
Legend:
Removed from v.1.108  
changed lines
  Added in v.1.109

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help