It wasn't on the R91 / R95 systems we used to code on here, but it's
definitely on Unidata 7.1 and based on an earlier reply, going back at
least as far as version 5.2.

FWIW, SORT is documented in BASR.PDF - part of the standard docs that
come with unidata. Bit more info there regarding which delimiter is used
when deciding what to sort, and one caveat - it treats all data as left
aligned strings, so numeric sorting is out - unless the data is prepared
just-so - perhaps by preceded the SORT with something like LIST =
OCONVS(LIST,"MR#10") - where the number is at least the length of the
longest possible key.

Edward


-----Original Message-----
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Bessel, Karen
Sent: 03 February 2009 18:03
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] unibasic's sort function

I didn't think it existed either, that's pretty darned cool. I looked
for it in the BASIC.HELP file, and it isn't there. Is it a UniData
thing?









Karen Bessel
Software Developer

Tyler Technologies, Inc.
6500 International Parkway, Suite 2000
Plano, TX 75093
Phone: 972.713.3770 ext:6227
Fax: 972.713.3777 
Email: karen.bes...@tylertech.com
Web: http://www.tylertech.com
-----Original Message-----
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Edward Brown
Sent: Tuesday, February 03, 2009 11:15 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] unibasic's sort function

The SORT function (which I'm embarrassed to say I didn't think existed,
and I've been coding unibasic for the last 8 or 9 years!) sorts the data
passed into it; there isn't a return value. So

SORT(LIST)
CRT LIST

does work. Your original program sets LIST to 0 because LIST is set to
the return result of the sort statement - perhaps this should throw a
compiler error? Or perhaps there's an undocumented return code if the
data could not be sorted?


Edward

-----Original Message-----
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Dave Laansma
Sent: 03 February 2009 16:56
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] unibasic's sort function

I am not sure about the  SORT, but I would suggest simply:

LIST = ""
KEY = ....
LIST<-1> = KEY

David Laansma
IT Manager
Hubbard Supply Co. 
Direct: 810-342-7143
Office:810-234-8681
Fax: 810-234-6142
www.hubbardsupply.com
"Delivering Products, Services, and Innovative Solutions"


-----Original Message-----
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Greg Schraiber
Sent: Tuesday, February 03, 2009 11:30 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] unibasic's sort function

I have a dynamic array built like this:

 

LIST = ""

 

 

KEY = CONDES.DESIGNATION : "*" : CONTRIB.DONOR.DATE : "*" : ID.NO

 

IF LEN(LIST) = 0 THEN

 LIST = KEY

END ELSE

 LIST := @AM : KEY

END

 

When I do:

LIST = SORT(LIST) in Unibasic, compil and run it, it returns LIST=0

 

Can anyone tell me what I am doing wrong?

 

Thanks for your help!

 

Greg Schraiber

Beloit College
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

------------------------------------------------------------------------
-------------------
Please remember to recycle wherever possible. 
Reduce, reuse, recycle, think do you need to print this e-mail?
------------------------------------------------------------------------
-------------------
This e-mail and any attachment(s), is confidential and may be legally
privileged. It is intended solely for the addressee. If you are not the
addressee, dissemination, copying or use of this e-mail or any of its
content is prohibited and may be unlawful. If you are not the intended
recipient please inform the sender immediately and destroy the e-mail,
any attachment(s) and any copies. All liability for viruses is excluded
to the fullest extent permitted by law. It is your responsibility to
scan or otherwise check this email and any attachment(s). Unless
otherwise stated (i) views expressed in this message are those of the
individual sender (ii) no contract may be construed by this e-mail.
Emails may be monitored and you are taken to consent to this monitoring.


Civica Services Limited, Company No. 02374268; Civica UK Limited,
Company No. 01628868
Both companies are registered in England and Wales and each has its
registered office at 2 Burston Road, Putney, London, SW15 6AR.
------------------------------------------------------------------------
-------------------
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to