LB Booster
« FILES dependence on locale settings »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 03:59am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: FILES dependence on locale settings  (Read 383 times)
Rod
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 110
xx Re: FILES dependence on locale settings
« Reply #5 on: Apr 3rd, 2017, 3:39pm »

Since ordering files requires YYYY/MM/DD/HH/MM/SS and requires leading zeros that would be my preference, leading zeros. That allows simple comparison rather than more complex parsing.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: FILES dependence on locale settings
« Reply #6 on: Apr 3rd, 2017, 4:39pm »

on Apr 3rd, 2017, 3:39pm, Rod wrote:
Since ordering files requires YYYY/MM/DD/HH/MM/SS and requires leading zeros that would be my preference, leading zeros. That allows simple comparison rather than more complex parsing.

I agree, but would it be acceptable to make such a drastic and incompatible change at this stage? Perhaps a better approach would be to introduce a new column in the array, e.g. info$(n,4) containing an ordered timestamp specifically for the purpose of sorting etc.

We will probably never know, but I wonder whether LB/JB using a region-dependent and non-sortable date string format was a deliberate decision by Carl or an 'accident' arising from the use of some intrinsic SmallTalk function, perhaps.

Richard.
User IP Logged

SarmedNafi
Junior Member
ImageImage


member is offline

Avatar




PM


Posts: 93
xx Re: FILES dependence on locale settings
« Reply #7 on: Apr 4th, 2017, 02:16am »

In Baghdad we use the format: dd/mm/yyyy

The following code:

dim info$(10, 10)
files DefaultDir$, info$()
print info$(1, 2)
end

Produce under LBB and LB:
04/04/17 04:46:10 AM
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: FILES dependence on locale settings
« Reply #8 on: Apr 4th, 2017, 3:55pm »

on Apr 3rd, 2017, 4:39pm, Richard Russell wrote:
Perhaps a better approach would be to introduce a new column in the array, e.g. info$(n,4)

Can anybody think of a disadvantage (compatibility implications or otherwise) of doing this? The only negative consequence would seem to be the use of additional memory for the extra timestamp data, which of course could conceivably make the difference between a program running or not, but being that close to running out of memory seems improbable.

Richard.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls