[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
error with sort
- Subject: error with sort
- From: "R.Bauer" <R.Bauer(at)fz-juelich.de>
- Date: Mon, 10 Jan 2000 13:33:52 +0100
- Newsgroups: comp.lang.idl-pvwave
- Organization: Forschungszentrum Juelich GmbH
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:17957
Hi,
SORT() is not platform independent!!!!!
Try this:
** Structure !VERSION, 5 tags, length=40:
ARCH STRING 'x86'
OS STRING 'Win32'
OS_FAMILY STRING 'Windows'
RELEASE STRING '5.2'
BUILD_DATE STRING 'Oct 30 1998'
OR
* Structure !VERSION, 5 tags, length=40:
ARCH STRING 'x86'
OS STRING 'Win32'
OS_FAMILY STRING 'Windows'
RELEASE STRING '5.3'
BUILD_DATE STRING 'Nov 11 1999'
a=[1,1,1,1,1]
idx=sort(a)
PRINT,idx
1 2 3 4 0
b=['A','B','C','D','E']
PRINT,b[idx]
B C D E A
** Structure !VERSION, 5 tags, length=40:
ARCH STRING 'ibmr2'
OS STRING 'AIX'
OS_FAMILY STRING 'unix'
RELEASE STRING '5.2.1'
BUILD_DATE STRING 'Jun 4 1999'
a=[1,1,1,1,1]
idx=sort(a)
PRINT,idx
1 0 2 4 3
b=['A','B','C','D','E']
PRINT,b[idx]
B A C E D
================================================
R.Bauer
begin:vcard
n:Bauer;Reimar
x-mozilla-html:TRUE
org:Forschungszentrum Jülich
adr:;;;;;;
version:2.1
email;internet:r.bauer@fz-juelich.de
x-mozilla-cpt:;-1
fn:R. Bauer
end:vcard