Re: [fpc-pascal] How to use StrToDateTime() to convert a string with no delimiters?

2023-04-25 Thread Bo Berglund via fpc-pascal
On Tue, 25 Apr 2023 08:25:01 +0200 (CEST), Michael Van Canneyt via fpc-pascal
 wrote:

>
>
>On Mon, 24 Apr 2023, Thomas Kurz via fpc-pascal wrote:
>
>> I always use ScanDateTime for such purposes:
>>
>> https://www.freepascal.org/docs-html/rtl/dateutils/scandatetime.html
>>
>> You can explicitly define the pattern.
>
>Correct. This is the only correct way to do this.
>
>StrToDateTime is very limited in what it accepts.
>
>Michael.

Thanks, I did not know about this before, but now it is inserted in my code and
works fine. :-)

So now I can just specify the pattern of data to be scanned using the y, m, h, n
and s letters.
But I am adding 20 on front of the telegram value because that uses only a
2-digit year and I had problems on my new RPiZero until I added the two yy in
front of the pattern making it a 4-char year and the 20 in front of the
telegram.

Then all works fine.

-- 
Bo Berglund
Developer in Sweden

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] New VASM upgrade to 1.9d breaks z80-msxdos and z80-zxspectrum builds

2023-04-25 Thread Karoly Balogh via fpc-pascal
Hi,

On Tue, 25 Apr 2023, Pierre Muller via fpc-pascal wrote:

>I tested 1.9d version on a test machine,
> m68k targets are OK, but z80 targets now fail with:
>
> Executing "/FPC/compilers/cross-compiling/bin/z80-msxdos-vasmz80_std" with
> command line "-quiet -Fvobj -o
> /FPC/compilers/cross-compiling/pas/trunk/fpcsrc/rtl/units/z80-msxdos/si_prc.o
> /FPC/compilers/cross-compiling/pas/trunk/fpcsrc/rtl/units/z80-msxdos/si
> error 39 in line 95 of
> "/FPC/compilers/cross-compiling/pas/trunk/fpcsrc/rtl/units/z80-msxdos/si_prc.s":
> illegal relocation
>  >.word   .Lc2,.Lc1-.Lc2
> _prc.s"
> si_prc.pp(67,4) Error: Error while assembling exitcode 1
> si_prc.pp(67,4) Fatal: There were 2 errors compiling module, stopping
> Fatal: Compilation aborted

I'm not sure it was Nikolay's intention to support vasm for Z80, it was a
hack from be before the internal assembler existed... -.-'

Anyway, can you figure out when did it break? Did it work with 1.9c? Which
was the previous version you used?

Charlie
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] New VASM upgrade to 1.9d breaks z80-msxdos and z80-zxspectrum builds

2023-04-25 Thread Pierre Muller via fpc-pascal


  I tested 1.9d version on a test machine,
m68k targets are OK, but z80 targets now fail with:

Executing "/FPC/compilers/cross-compiling/bin/z80-msxdos-vasmz80_std" with command 
line "-quiet -Fvobj -o 
/FPC/compilers/cross-compiling/pas/trunk/fpcsrc/rtl/units/z80-msxdos/si_prc.o  
/FPC/compilers/cross-compiling/pas/trunk/fpcsrc/rtl/units/z80-msxdos/si
error 39 in line 95 of 
"/FPC/compilers/cross-compiling/pas/trunk/fpcsrc/rtl/units/z80-msxdos/si_prc.s":
 illegal relocation
>.word   .Lc2,.Lc1-.Lc2
_prc.s"
si_prc.pp(67,4) Error: Error while assembling exitcode 1
si_prc.pp(67,4) Fatal: There were 2 errors compiling module, stopping
Fatal: Compilation aborted


Pierre


Le 24/04/2023 à 15:27, Karoly Balogh via fpc-pascal a écrit :

Hi,

On Sat, 22 Apr 2023, Derek via fpc-pascal wrote:


I downloaded the updated version of vasm v1.9d and compiled and installed as
per Norman's document.


Just as a final update to this thread, Frank informed me, that the
official vasm 1.9d release is now out, so all users should upgrade to that
instead of using the daily snapshot. Just in case.

Charlie
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How to use StrToDateTime() to convert a string with no delimiters?

2023-04-25 Thread Michael Van Canneyt via fpc-pascal




On Mon, 24 Apr 2023, Thomas Kurz via fpc-pascal wrote:


I always use ScanDateTime for such purposes:

https://www.freepascal.org/docs-html/rtl/dateutils/scandatetime.html

You can explicitly define the pattern.


Correct. This is the only correct way to do this.

StrToDateTime is very limited in what it accepts.

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal