Re: [fpc-pascal] SerReadTimeout question

2022-09-18 Thread Christo Crause via fpc-pascal
On Mon, 19 Sep 2022, 03:18 James Richters via fpc-pascal, < fpc-pascal@lists.freepascal.org> wrote: > I can't seem to find any documentation or SerRead or SerReadTimeout.. > searching for either along with Freepascal doesn't get me any results. > If it exists somewhere and I am just missing it,

[fpc-pascal] SerReadTimeout question

2022-09-18 Thread James Richters via fpc-pascal
I can't seem to find any documentation or SerRead or SerReadTimeout.. searching for either along with Freepascal doesn't get me any results. If it exists somewhere and I am just missing it, can someone tell me where it is? Anyway, what I'm trying to figure out is when the timeout timer

Re: [fpc-pascal] Getting Shift key with PTCCRT

2022-09-18 Thread James Richters via fpc-pascal
I came up with a solution for this. Since I am on windows, I found I can just check GetAsyncKeyState between keypressed and readkey like this: If PTCCRT.KeyPressed then Begin isShiftDown := GetAsyncKeyState(VK_Shift); MyKey:=PTCCRT.ReadKey;

Re: [fpc-pascal] $modeswitch declared before $mode fails without warning

2022-09-18 Thread Sven Barth via fpc-pascal
Am 18.09.2022 um 15:39 schrieb Hairy Pixels via fpc-pascal: On Sep 18, 2022, at 7:37 PM, Florian Klämpfl via fpc-pascal wrote: This is in general the case that $mode overrides all previously set switches i.e. it simply sets the switches as defined by the given mode so I am not sure if

Re: [fpc-pascal] $modeswitch declared before $mode fails without warning

2022-09-18 Thread Hairy Pixels via fpc-pascal
> On Sep 18, 2022, at 7:37 PM, Florian Klämpfl via fpc-pascal > wrote: > > This is in general the case that $mode overrides all previously set switches > i.e. it simply sets the switches as defined by the given mode so I am not > sure if this is really worth a warning. Is there ever a time

Re: [fpc-pascal] $modeswitch declared before $mode fails without warning

2022-09-18 Thread Florian Klämpfl via fpc-pascal
Am 18.09.22 um 14:22 schrieb Hairy Pixels via fpc-pascal: One more thing today working with closures. Declaring the modeswitch before the mode does not actually enable the feature and gives no warning. What happens then is basic syntax fails and you’re totally confused as to why. Shouldn’t

[fpc-pascal] $modeswitch declared before $mode fails without warning

2022-09-18 Thread Hairy Pixels via fpc-pascal
One more thing today working with closures. Declaring the modeswitch before the mode does not actually enable the feature and gives no warning. What happens then is basic syntax fails and you’re totally confused as to why. Shouldn’t this be illegal or give a warning at least? {$modeswitch