[gforth] / gforth / Attic / primitives  

gforth: gforth/Attic/primitives

Diff for /gforth/Attic/primitives between version 1.25 and 1.26

version 1.25, Wed Nov 23 16:54:40 1994 UTC version 1.26, Mon Dec 12 17:10:49 1994 UTC
Line 269 
Line 269 
  ?DO  dup I c!  LOOP  drop ;   ?DO  dup I c!  LOOP  drop ;
   
 compare         c_addr1 u1 c_addr2 u2 -- n      string  compare         c_addr1 u1 c_addr2 u2 -- n      string
   ""Compare the strings lexicographically. If they are equal, n is 0; if
   the first string is smaller, n is -1; if the first string is larger, n
   is 1. Currently this is based on the machine's character
   comparison. In the future, this may change to considering the current
   locale and its collation order.""
 n = memcmp(c_addr1, c_addr2, u1<u2 ? u1 : u2);  n = memcmp(c_addr1, c_addr2, u1<u2 ? u1 : u2);
 if (n==0)  if (n==0)
   n = u1-u2;    n = u1-u2;
Line 1068 
Line 1073 
   
 fround          r1 -- r2        float  fround          r1 -- r2        float
 /* !! unclear wording */  /* !! unclear wording */
   #ifdef HAVE_RINT
 r2 = rint(r1);  r2 = rint(r1);
   #else
   r2 = floor(r1+0.5);
   /* !! This is not quite true to the rounding rules given in the standard */
   #endif
   
 fmax            r1 r2 -- r3     float  fmax            r1 r2 -- r3     float
 if (r1<r2)  if (r1<r2)


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

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help