Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

186,000 Miles per Second. It's not just a good idea. IT'S THE LAW.


devel / comp.lang.xharbour / Re: array sorting

SubjectAuthor
* array sortingtimepro timesheet
`- Re: array sortingpoopall

1
array sorting

<e0a6cb6d-4e11-464c-afad-e399a0e35bf5n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17117&group=comp.lang.xharbour#17117

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:a05:622a:1c1:b0:39a:9da4:1177 with SMTP id t1-20020a05622a01c100b0039a9da41177mr5285115qtw.11.1665769472223;
Fri, 14 Oct 2022 10:44:32 -0700 (PDT)
X-Received: by 2002:a81:8414:0:b0:355:71a6:f1cf with SMTP id
u20-20020a818414000000b0035571a6f1cfmr5889814ywf.372.1665769472014; Fri, 14
Oct 2022 10:44:32 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Fri, 14 Oct 2022 10:44:31 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=96.242.45.184; posting-account=jZAeNwoAAABYWjMRM-FfqKkHfC3Iph0l
NNTP-Posting-Host: 96.242.45.184
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e0a6cb6d-4e11-464c-afad-e399a0e35bf5n@googlegroups.com>
Subject: array sorting
From: timecosting@gmail.com (timepro timesheet)
Injection-Date: Fri, 14 Oct 2022 17:44:32 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1225
 by: timepro timesheet - Fri, 14 Oct 2022 17:44 UTC

xlsfiles=adir(diskname()+':\tax\einvoice\'+qrc_in+'\*.xlsx')
or
ADIR(diskname()+':'\tax\einvoice\'+qrc_in+'\*.xlsx', xlsFiles)

-how to get the last dated+time filename from the array?
-how to get the largest size filename from the array?

tia.

Re: array sorting

<618a5b75-57f7-42ab-b7e8-f717a6a95593n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17124&group=comp.lang.xharbour#17124

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:a05:6214:20cf:b0:4b1:72a5:2f15 with SMTP id 15-20020a05621420cf00b004b172a52f15mr13846408qve.49.1666312388075;
Thu, 20 Oct 2022 17:33:08 -0700 (PDT)
X-Received: by 2002:a81:8387:0:b0:364:3538:a122 with SMTP id
t129-20020a818387000000b003643538a122mr13870395ywf.364.1666312387675; Thu, 20
Oct 2022 17:33:07 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Thu, 20 Oct 2022 17:33:07 -0700 (PDT)
In-Reply-To: <e0a6cb6d-4e11-464c-afad-e399a0e35bf5n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=119.18.31.162; posting-account=zx0oKAkAAABMkjQR74hmeFvHN7cev7io
NNTP-Posting-Host: 119.18.31.162
References: <e0a6cb6d-4e11-464c-afad-e399a0e35bf5n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <618a5b75-57f7-42ab-b7e8-f717a6a95593n@googlegroups.com>
Subject: Re: array sorting
From: lawrence.edelstein@gmail.com (poopall)
Injection-Date: Fri, 21 Oct 2022 00:33:08 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2303
 by: poopall - Fri, 21 Oct 2022 00:33 UTC

On Saturday, 15 October 2022 at 4:44:33 am UTC+11, timec...@gmail.com wrote:
> xlsfiles=adir(diskname()+':\tax\einvoice\'+qrc_in+'\*.xlsx')
> or
> ADIR(diskname()+':'\tax\einvoice\'+qrc_in+'\*.xlsx', xlsFiles)
>
> -how to get the last dated+time filename from the array?
> -how to get the largest size filename from the array?
>
> tia.

I hope I am not breaching copy right here, but an example is given in http://www.xHarbour.com Language Guides

or see https://vivaclipper.wordpress.com/2014/01/07/asort/

Examples

// sort numeric values in ascending order
ASort( { 3, 1, 4, 42, 5, 9 } ) // result: { 1, 3, 4, 5, 9, 42 }

// sort character strings in descending lexical order
aKeys := { "Ctrl", "Alt", "Delete" }
bSort := {| x, y | Upper( x ) > Upper( y ) }
ASort( aKeys,,, bSort ) // result: { "Delete", "Ctrl", "Alt" }

// sort two-dimensional array according to 2nd element of each pair
aPair := { { "Sun", 8 }, { "Mon", 1 }, { "Tue", 57 }, { "Wed", -6 } }
ASort( aPair,,, {| x, y | x[ 2 ] < y[ 2 ] } )
// result: { { "Wed", -6 }, { "Mon", 1 }, { "Sun", 8 }, { "Tue", 57 } }

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor