<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<font face="Arial">This is a sample of how I have always sorted
arrays in filePro if needed.<br>
<br>
@keyc::declare junk(2,.0):<br>
::dim dat(10)(2,.0):<br>
::dat("1")="6";dat("2")="1";dat("3")="4";dat("4")="8";dat("5")="2":<br>
::dat("6")="3";dat("7")="5";dat("8")="10";dat("9")="7";dat("10")="9":<br>
::zx(2,.0)="1":<br>
::ct(2,.0)="1":<br>
loop:::<br>
:dat(zx) gt dat(zx+ct):gosub swap:<br>
:junk ne "" and ct+zx lt "10":ct=ct+"1" ; goto loop:<br>
:zx ne "9":zx=zx+"1" ; ct="1" ; goto loop:<br>
::x=listbox (dat,"1","10"):<br>
::end:<br>
swap:::<br>
::junk=dat(zx+ct);dat(zx+ct)=dat(zx);dat(zx)=junk:<br>
::return:<br>
<br>
<br>
</font><br>
<div class="moz-cite-prefix">On 6/5/2018 11:26 AM, Richard D.
Williams via Filepro-list wrote:<br>
</div>
<blockquote type="cite"
cite="mid:fcc827e9-9f09-98a3-5814-9bfb6b730281@appgrp.net">Dave,
<br>
<br>
I don't know of any function in FP that will sort an array.
<br>
<br>
What I do is write the array data out to a temporary file that has
an index built in the correct order,
<br>
clear the array, reach back into the temporary file, and fill the
array again.
<br>
<br>
You can use the tty as a unique identifier for each instance.
<br>
<br>
Hope this helps,
<br>
<br>
Richard
<br>
<br>
<br>
On 6/5/2018 9:28 AM, davidrottkamp via Filepro-list wrote:
<br>
<blockquote type="cite">Hi
<br>
<br>
Is there a way to sort an array made inside filepro
<br>
<br>
version
<br>
<br>
linux
<br>
<br>
<br>
</blockquote>
<br>
_______________________________________________
<br>
Filepro-list mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Filepro-list@lists.celestial.com">Filepro-list@lists.celestial.com</a>
<br>
Subscribe/Unsubscribe/Subscription Changes
<br>
<a class="moz-txt-link-freetext" href="http://mailman.celestial.com/mailman/listinfo/filepro-list">http://mailman.celestial.com/mailman/listinfo/filepro-list</a>
<br>
<br>
</blockquote>
<br>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br />
<table style="border-top: 1px solid #D3D4DE;">
<tr>
<td style="width: 55px; padding-top: 13px;"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=icon" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;" /></a></td>
<td style="width: 470px; padding-top: 12px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Virus-free. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=link" target="_blank" style="color: #4453ea;">www.avast.com</a>
</td>
</tr>
</table><a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>