Inform - Support - Source

Back to List

Inventory
Complete

Backward
At End

Plain
Coloured
Gaudy

This code
in plain text

Browsing parserm.h

UnsignedCompare (lines 4522-4533)

4522  !  Useful routine: unsigned comparison (for addresses in Z-machine)
4523  !    Returns 1 if x>y, 0 if x=y, -1 if x
4524  ! ----------------------------------------------------------------------------
4525   
4526  [ UnsignedCompare x y u v;
4527    if (x==y) return 0;
4528    if (x<0 && y>=0) return 1;
4529    if (x>=0 && y<0) return -1;
4530    u = x&$7fff; v= y&$7fff;
4531    if (u>v) return 1;
4532    return -1;
4533  ];


Last updated 27 February 2004. This web site has not been fully supported since April 2008. Information may be out of date. This page was originally managed by Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight.