Op 03-04-2021 om 21:14 schreef Dimitrios Chr. Ioannidis via fpc-pascal:
Στις 3/4/2021 8:49 μ.μ., ο/η Joost van der Sluis via fpc-pascal έγραψε:
During some spare free time I've ported parts of the Arduino AVR
library to Free Pascal. So now it is possible to use things like
'DigitalWrite' and
Normally something like this should do the trick (here 3 decimals and 7
characters for total width):
program Format_Example;
uses
sysutils;
procedure F( _d: double);
var
S: String;
begin
S:= Format('%7.3f',[_d]);
WriteLn( S);
end;
begin
F(0.5);
F(2.53);
F(12.5);
Hi,
Στις 3/4/2021 8:49 μ.μ., ο/η Joost van der Sluis via fpc-pascal έγραψε:
Hi all,
During some spare free time I've ported parts of the Arduino AVR
library to Free Pascal. So now it is possible to use things like
'DigitalWrite' and 'Delay'.
More info here:
> Am 03.04.2021 um 19:49 schrieb Joost van der Sluis via fpc-pascal
> :
>
> Hi all,
>
> During some spare free time I've ported parts of the Arduino AVR library to
> Free Pascal. So now it is possible to use things like 'DigitalWrite' and
> 'Delay'.
>
> More info here:
>
Hi all,
During some spare free time I've ported parts of the Arduino AVR library
to Free Pascal. So now it is possible to use things like 'DigitalWrite'
and 'Delay'.
More info here:
https://lazarussupport.com/introducing-pasduino-the-pascal-avr-arduino-library/
The library itself is at:
Hi,
I tried this (add StrUtils to uses):
procedure TForm1.Button1Click(Sender: TObject);
var i, l: Integer;
aV: Double;
aF: TFormatSettings;
begin
aF.DecimalSeparator:='.';
aF.ThousandSeparator:=' ';
for i:=-2 to 10 do
begin
aV:=pi*power(10, i);
You can always convert the number to a string, then format it
accordingly. It's probably not the solution you want, but it will do
the trick.
On 4/3/2021 11:43 AM, James Richters via fpc-pascal wrote:
I'm looking for a way to format numerical data in a string so that everything
ends up
LacaK via fpc-pascal schrieb am Sa., 3.
Apr. 2021, 13:22:
> Hi,
> I did small test project for library:
> (with -CX -WR -O3 -Xs -XX options set)
>
> library library1;
> {$mode objfpc}{$H+}
> uses
> SysUtils, Classes;
> begin
> end.
>
> Compilation produces DLL with size 200+ KB.
>
> When in
I'm looking for a way to format numerical data in a string so that everything
ends up aligned by the decimal point.
I've been trying to use the Format() function but I don't see how to do what I
am looking for...
then again I don't really understand the format() function, and most of the
Op 2021-04-03 om 13:22 schreef LacaK via fpc-pascal:
I am guessing, that there must be something in initialization sections
of units (SysUtils and Classes), which cause that some code is
included, right?
Can I somehow to avoid this grow of size (for example I need from
Classes only
Hi,I did small test project for library:(with -CX -WR -O3 -Xs -XX options set)library library1;{$mode objfpc}{$H+}uses SysUtils, Classes;beginend. Compilation produces DLL with size 200+ KB.When in uses is only SysUtils then size is under 100 KB.Whene there are not units in uses clause then size
11 matches
Mail list logo