Re: [fpc-pascal] GetSaveFileNameA limited to 100 characters in default name

2021-06-19 Thread Jean SUZINEAU via fpc-pascal
I think you should have a look at this documentation on strings, particularly for PChar : https://www.freepascal.org/docs-html/ref/refsu9.html Le 20/06/2021 à 02:09, James Richters a écrit : DefaultFileName: AnsiString = '' ; So Length(DefaultFileName) = 0 TFileName.nMaxFile:=Max_Path+1; Thi

Re: [fpc-pascal] Will the size of an executable depend on the uses clause

2021-06-19 Thread wkitty42--- via fpc-pascal
On 6/19/21 9:40 AM, Bo Berglund via fpc-pascal wrote: Strange name of a function, though, is that needed? idk why the specific name was selected but you need some easy way to add leading zeros if you want them... some might complain about the conversion from integer to string, though... i've

Re: [fpc-pascal] Will the size of an executable depend on the uses clause

2021-06-19 Thread Jean SUZINEAU via fpc-pascal
Le 19/06/2021 à 15:40, Bo Berglund via fpc-pascal a écrit : function _2d( _i: Integer): String; Strange name of a function, though, is that needed? No, it's not needed, it's just my odd way of naming ... ;-)  (the closer to %.2d ). ___ fpc-pascal mai

Re: [fpc-pascal] GetSaveFileNameA limited to 100 characters in default name

2021-06-19 Thread Jean SUZINEAU via fpc-pascal
It's curious, I'm not completely sure we are reasoning about the same function and record. You mention TFileName but for me in FPC 3.2.0: -  TFileName is declared as "TFileName= type string;" in sysutilh.inc. - OPENFILENAMEA is declared as record in CommDlg.pp line 94   and TOPENFILENAMEA=OPEN

Re: [fpc-pascal] Will the size of an executable depend on the uses clause

2021-06-19 Thread Bo Berglund via fpc-pascal
On Fri, 18 Jun 2021 18:13:52 +0200, Jean SUZINEAU via fpc-pascal wrote: > >function _2d( _i: Integer): String; >begin > Str( _i, _2d); > if Length(_2d) < 2 then _2d:= '0'+_2d; > >end; Thanks, it seems like this gets rid of the Format call, which probably brings in a lot of un-needed st