Re: Nat_sort problems
- Posted by Derek Parnell <ddparnell at bigpond.com> Aug 11, 2003
- 440 views
----- Original Message -----=20 From: "Tony Steward" <tsteward at dodo.com.au> To: "EUforum" <EUforum at topica.com> Subject: Nat_sort problems >=20 >=20 > Hello all, > When I use nat_sort on the following sequence My program crashes with=20 > this error >=20 > C:\EUPHORIA\ExInclude\\\\nat_sort.e:171 in function nat_compare()=20 > type_check failure, x2num is 1234567890=20 >=20 >=20 > I use nat_sort like this: order =3D nat_sort(order) >=20 > Below is the actual data order contains. >=20 > order =3D { > {49'1',48'0',52'4',47'/',82'R',73'I',78'N',71'G'}, > =20 > = {49'1',50'2',51'3',52'4',53'5',54'6',55'7',56'8',57'9',48'0',49'1',50'2',= 51'3',52'4',53'5'}, Tony, the problem is that the nat_sort routine defines x2num as an integer and = integers can only hold numbers up to 1073741824, but the second element = in your sample is 123456789012345, which is too big. Try changing the = nat_sort routine so that the x1num and x2num are atoms instead of = integers. --=20 Derek