Re: [Ql-Users] Behaviour of DIV with negative numbers in SBASIC (QPC2)

2017-01-05 Thread Martyn Hill
Thank you Tobias! Makes sense with that context. M. On 05/01/2017 15:49, Tobias Fröschle wrote: Martyn, Integer division for negative numbers is not very well defined. Language designers get to choose if their language will round towards zero, negative infinity, or positive infinity when

Re: [Ql-Users] Wrong dates on DOS & NFA

2017-01-05 Thread Martyn Hill
Hi Dilwyn I played with your Sync program myself recently (thank you!) and noticed what appeared to be a mistake in how a source file's Update-date was being extracted from the directory - GET in to a float (updt1) , rather than LGET for the long-word Date. Not sure if I was using your

[Ql-Users] Bevaiour of DIV with negative numbers in SBASIC (QPC2)

2017-01-05 Thread Martyn Hill
Hi everyone Can anyone tell me the expected behaviour for the integer-divide operator 'DIV' in SBASIC, when provided with a negative dividend/numerator? My number-theory is a bit rusty, but I would have thought that, say, -1 DIV 10 should result in 0 (with remainder/MOD of -1). Instead, on

Re: [Ql-Users] Behaviour of DIV with negative numbers in SBASIC (QPC2)

2017-01-05 Thread Tobias Fröschle
Martyn, Integer division for negative numbers is not very well defined. Language designers get to choose if their language will round towards zero, negative infinity, or positive infinity when doing integer division. Different languages have made different choices. S*Basic designers have

Re: [Ql-Users] Wrong dates on DOS & NFA

2017-01-05 Thread Dilwyn Jones
Thank you Martin, I'll sort this out as soon as I get a chance. Dilwyn -Original Message- From: Martyn Hill Sent: Thursday, January 05, 2017 10:16 AM To: ql-users@lists.q-v-d.com Subject: Re: [Ql-Users] Wrong dates on DOS & NFA Hi Dilwyn I played with your Sync program myself

Re: [Ql-Users] Wrong dates on DOS & NFA

2017-01-05 Thread Martyn Hill
Hi Dilwyn I played with your Sync program myself recently and noticed what appeared to be a mistake in how a file's Update-date was being extracted from the directory (GET in to a float, rather than LGET for the Long-word Date.) Not sure if I was using your latest version (downloaded form