Re: [fpc-pascal] Bug or feature ?
Am 27.07.2022 um 15:14 schrieb Ched via fpc-pascal: Hello All, I have a long code which include lines for writing stuffs into an assigned writable text-file F. WRITELN(F: 'Hello'); WRITELN(F, 'Hello'); The code can be compiled with 3.2.2 in i386/windows and i386/linux and runs both times at perfection. But... i'm wondering if the first line is really legal... Any advice ? Write(), WriteLn() and WriteStr() (and Str()) allow to adjust the way a numerical value is written by using additional parameters delimited by colons: VarToOutput:NumChars[:Decimals] (see https://www.freepascal.org/docs-html/current/rtl/system/write.html ). That it nevertheless compiles correctly and executes as "Writeln(F, 'Hello')" is due to a bug in the handling of the parameters. So, please report a bug with a complete example that should fail. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Bug or feature ?
Le 27.07.2022 à 17:41, DougC via fpc-pascal a écrit : WRITELN(F: 'Hello'); is not proper Pascal. Yes, Doug, I agree ; but it is compiled with no warning and runs perfectly. Now, why the compiler do not complain... ? Cheers, Ched' ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Bug or feature ?
WRITELN(F: 'Hello'); is not proper Pascal.___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] Bug or feature ?
Hello All, I have a long code which include lines for writing stuffs into an assigned writable text-file F. WRITELN(F: 'Hello'); WRITELN(F, 'Hello'); The code can be compiled with 3.2.2 in i386/windows and i386/linux and runs both times at perfection. But... i'm wondering if the first line is really legal... Any advice ? Cheers, Ched'. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal