Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-03

format problem

21 messages · 9 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andrea Mauri

I have problems with format function.
If I set:

   f:= -0.0002;

and then I do:

   Edit1.Text:= FormatFloat('0.000', f);
   Edit2.Text:= format('%.0f', [f]);
   Edit3.Text:= format('%.3f', [f]);

The results I obtain are:
-0.000
-0
-0.000
While they should be:
0.000
0
0.000
I have to report a bug to mantis fpc-rtl?
andrea

Reply by email

Michael Van Canneyt
to Andrea Mauri
Andrea Mauri wrote 16 lines
I have problems with format function. If I set: f:= -0.0002; and then I do: Edit1.Text:= FormatFloat('0.000', f); Edit2.Text:= format('%.0f', [f]); Edit3.Text:= format('%.3f', [f]); The results I obtain are: -0.000 -0 -0.000 While they should be: 0.000 0 0.000 I have to report a bug to mantis fpc-rtl?

Yes, although I think there is still a related bug open in FPC/rtl. Please search first.

Michael.

Reply by email

Andrea Mauri
to Michael Van Canneyt

Il 11/03/2010 10.00, Michael Van Canneyt ha scritto:

Yes, although I think there is still a related bug open in FPC/rtl. Please search first.

I found some bugs related to formatfloat but not this specific bug. I submitted it as 0015957

Reply by email

Andrea Mauri
to Andrea Mauri

Il 11/03/2010 10.13, Andrea Mauri ha scritto:

I found some bugs related to formatfloat but not this specific bug. I submitted it as 0015957

erroneously I submitted it two times 0015957 and 0015958. How can I delete the duplicated bug?

Reply by email

Justin Smyth
to Michael Van Canneyt: Yes, although I think there is still a related bug open in FPC/rtl. Please search first.…

If someone could help me here it would be really usefull.,

Currently i have problems that i cant run debug any applications in Lazarus using Lazarus 0.9.29-23934-fpc-2.5.1

I am aware that for X64 i need to replace gdb.exe with v7 or higher and to add this option to the compliler options
-WB00400000 ( which i have used before and it worked )

i am stuffed as to why i cant get it to work , i have tried to install on a different pc which hasnt been used for lazarus before and did the same replace gdb.exe and add the complier option . to no avai.

can someone please help , am i missing something here , is there some debug switches that need to be turned on that arent the default ones ? )

Justin Smyth

Reply by email

Paul Ishenin
to Justin Smyth
Justin Smyth wrote
If someone could help me here it would be really usefull., Currently i have problems that i cant run debug any applications in Lazarus using Lazarus 0.9.29-23934-fpc-2.5.1

We can help you only if you show your debugger log: View -> Debug windows -> Debug output.

Best regards,
Paul Ishenin.

Reply by email

Justin Smyth
to Paul Ishenin

I checked the debug output notice where it was saving it to .... noticed it was saving the project in my docs directory and i'm on Win7 .. thats the prob,i've solved it by saving it to a fresh directory in c:\apps\build ( my test dir)

Justin Smyth

Reply by email

zeljko
to Andrea Mauri: I have problems with format function. If I set: f:= -0.0002; and then I do: Edit1.Text:=…
Andrea Mauri wrote 16 lines
I have problems with format function. If I set: f:= -0.0002; and then I do: Edit1.Text:= FormatFloat('0.000', f); Edit2.Text:= format('%.0f', [f]); Edit3.Text:= format('%.3f', [f]); The results I obtain are: -0.000 -0 -0.000 While they should be: 0.000 0 0.000 I have to report a bug to mantis fpc-rtl?

no, it's already reported by me
http://bugs.freepascal.org/view.php?id=13722

Reply by email

Vincent Snijders
to Flávio Etrusco
Fl?vio Etrusco wrote 6 lines
On Thu, Mar 11, 2010 at 8:38 AM, Andrea Mauri wrote: > Il 11/03/2010 12.32, zeljko ha scritto: >> no, it's already reported by me >> http://bugs.freepascal.org/view.php?id=13722 > I already submitted, so the 0015957 and 0015958 bugreports should be > removed.

These issues are already resolved as dupllicates and are not in the way (certainly not, if you close them, Andrea).

Marc, Mattias, Paul, et al, I volunteer if you want somebody having specific tasks in "sanitizing"/triaging the mantis issues...

See http://wiki.lazarus.freepascal.org/Moderating_the_bug_tracker for instructions about the Lazarus bug tracker.

Vincent

Reply by email

Andrea Mauri
to Andrea Mauri

Il 11/03/2010 20.15, Andrea Mauri ha scritto:

how can I test the fixes to 2.4.0?

I have to dowload the sources of fpc from svn (/branches/fixes_2_4)? Is it enough to change the fpc sources directory in lazarus options? maybe these questions are trivial, sorry.
thanks, andrea

Reply by email

Justin Smyth
to Andrea Mauri

When i create forms that dont have the title bar i typically use the windows message WM_NCHITTEST to capture the mouse movements but i cant get it to work

anyone got any ideas - my form has no titlebar and all i want to do is be able to click on it and move it.

Justin Smyth

Reply by email

Paul Ishenin
to Justin Smyth
Justin Smyth wrote 7 lines
When i create forms that dont have the title bar i typically use the windows message WM_NCHITTEST to capture the mouse movements but i cant get it to work anyone got any ideas - my form has no titlebar and all i want to do is be able to click on it and move it.

WM_NCHITTEST is not possible to implement cross-platform.

Better if you will think about another solution than try to reuse a windows only feature in LCL application.

Best regards,
Paul Ishenin.

Reply by email

Luca Olivetti
to Paul Ishenin

En/na Paul Ishenin ha escrit:

Show quoted text 13 lines
12.03.2010 11:11, Justin Smyth wrote: > When i create forms that dont have the title bar i typically use the > windows message WM_NCHITTEST to capture the mouse movements but i cant > get it to work > > > anyone got any ideas - my form has no titlebar and all i want to do is > be able to click on it and move it. WM_NCHITTEST is not possible to implement cross-platform. Better if you will think about another solution than try to reuse a windows only feature in LCL application.

Under linux there's no need to do anything: just alt+drag anywhere on the window and it will move.
Under window there's a recipe on how to hook messages in the wiki, but I cannot access the wiki right now so I cannot give a link.

Bye

Luca Olivetti Wetron Automatizaci?n S.A. http://www.wetron.es/ Tel. +34 93 5883004 (Ext.133) Fax +34 93 5883007

Reply by email

Justin Smyth
to Luca Olivetti

Thanks Guys i have found a way around this in my form i get it to call the windows message itself when it detects Mouse Down & MouseMove ( on mousedown set a variable to say move = true and in mousemove send off a windows message something like this SendMessage (Handle, WM_NCHITTEST, 2, 0); )

Seems to work compaired it to the code i used in D12 , same effect ...

Justin Smyth

Earlier message 34 lines
----- Original Message ----- From: "Luca Olivetti" To: "Lazarus mailing list" Sent: Friday, March 12, 2010 7:26 PM Subject: Re: [Lazarus] Windows message WM_NCHitTest not working... En/na Paul Ishenin ha escrit: > 12.03.2010 11:11, Justin Smyth wrote: >> When i create forms that dont have the title bar i typically use the >> windows message WM_NCHITTEST to capture the mouse movements but i cant >> get it to work >> >> >> anyone got any ideas - my form has no titlebar and all i want to do is >> be able to click on it and move it. > > WM_NCHITTEST is not possible to implement cross-platform. > > Better if you will think about another solution than try to reuse a > windows only feature in LCL application. Under linux there's no need to do anything: just alt+drag anywhere on the window and it will move. Under window there's a recipe on how to hook messages in the wiki, but I cannot access the wiki right now so I cannot give a link. Bye -- Luca Olivetti Wetron Automatizaci?n S.A. http://www.wetron.es/ Tel. +34 93 5883004 (Ext.133) Fax +34 93 5883007 --

Reply by email

Maxim Ganetsky
to Andrea Mauri

15.03.2010 12:16, Andrea Mauri ?????:

Show quoted text 7 lines
Il 12/03/2010 23.22, Maxim Ganetsky ha scritto: > Use compiler from this branch: > http://svn.freepascal.org/svn/fpc/branches/fixes_2_4 I supposed it. I have two questions: 1. once downloaded the fixes, I have to compile it and use it? How can I do that?

Yes. See buildfaq: http://www.stack.nl/~marcov/buildfaq.pdf

2. Is the fixes branch stable? Can I use it for development? Actually I have 2.4.0 installed from binaries, how can I compile and say to lazarus to use the fixes branch?

It is quite stable for me, but nonetheless you should use it only if you know what you are doing. Lazarus can be pointed to new compiler binary in Environment -> Options.

Best regards, Maxim Ganetsky mailto:

Reply by email