Sign in Join

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

Mailing lists / lazarus / 2008-07

Same executable behaves differently on different windows machines

6 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

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

Emmanouil Paissios

Hi all,

I recently developed a program using lazarus and observed that the same executable for windows, performs completely faulty computations in a specific computer to which, unfortunately, I do not have much access, since it is the laptop of my supervisor. The aforementioned machine runs windows xp, yet in other windows xp and windows 2000 versions I've tried, the program worked fine, also under wine. The project compiled for linux and mac behaved correctly.

The program only performs various calculations according to a given input specified by the gui and plots several charts. No input files, no output files and no environment variables are used.

I would appreciate any ideas of why something like this could possibly occur.

Thanks in advance for any help,

Manos

Reply by email

Burkhard Carstens
to Emmanouil Paissios
Emmanouil Paissios wrote 16 lines
Hi all, I recently developed a program using lazarus and observed that the same executable for windows, performs completely faulty computations in a specific computer to which, unfortunately, I do not have much access, since it is the laptop of my supervisor. The aforementioned machine runs windows xp, yet in other windows xp and windows 2000 versions I've tried, the program worked fine, also under wine. The project compiled for linux and mac behaved correctly. The program only performs various calculations according to a given input specified by the gui and plots several charts. No input files, no output files and no environment variables are used. I would appreciate any ideas of why something like this could possibly occur.

First thing that comes to mind is different locale setting, i.e. decimal separator etc. E.g. assuming the gui inputs are some floating point values entered in edit fields and later converted to float with StrToFloat, the conversion will fail, if the edit contains "1.23" but the systems decimal separator is set to "," (like e.g. on a german system) and thus expects "1,23".

regards
Burkhard

Reply by email

Vincent Snijders
to Emmanouil Paissios: I recently developed a program using lazarus and observed that the same executable for…
Emmanouil Paissios wrote 15 lines
Hi all, I recently developed a program using lazarus and observed that the same executable for windows, performs completely faulty computations in a specific computer to which, unfortunately, I do not have much access, since it is the laptop of my supervisor. The aforementioned machine runs windows xp, yet in other windows xp and windows 2000 versions I've tried, the program worked fine, also under wine. The project compiled for linux and mac behaved correctly. The program only performs various calculations according to a given input specified by the gui and plots several charts. No input files, no output files and no environment variables are used. I would appreciate any ideas of why something like this could possibly occur.

Please read: http://www.catb.org/~esr/faqs/smart-questions.html

For example, it is unclear, what faulty calculation means.

Vincent

Reply by email

Coppola Ing. Salvatore
to Burkhard Carstens: First thing that comes to mind is different locale setting, i.e. decimal separator etc.…
Burkhard Carstens wrote 27 lines
Am Mittwoch, 23. Juli 2008 10:35 schrieb Emmanouil Paissios: > Hi all, > > I recently developed a program using lazarus and observed that the > same executable for windows, performs completely faulty computations > in a specific computer to which, unfortunately, I do not have much > access, since it is the laptop of my supervisor. The aforementioned > machine runs windows xp, yet in other windows xp and windows 2000 > versions I've tried, the program worked fine, also under wine. The > project compiled for linux and mac behaved correctly. > > The program only performs various calculations according to a given > input specified by the gui and plots several charts. No input files, > no output files and no environment variables are used. > > I would appreciate any ideas of why something like this could > possibly occur. > First thing that comes to mind is different locale setting, i.e. decimal separator etc. E.g. assuming the gui inputs are some floating point values entered in edit fields and later converted to float with StrToFloat, the conversion will fail, if the edit contains "1.23" but the systems decimal separator is set to "," (like e.g. on a german system) and thus expects "1,23".

In that case can help to set

  DecimalSeparator:=',';
  ThousandSeparator:='.';

or viceversa
at main form create event
Regards
Salvatore

Show quoted text 10 lines
regards Burkhard _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Emmanouil Paissios
to Coppola Ing. Salvatore

Wow, it was indeed related to the separators. The actual problem was that for some reason in his system the decimal separator was the same as the thousand separator... Setting DecimalSeparator and ThousandSeparator solved it.

Thanks very much for all the help,

Best regards,

Manos

Coppola Ing. Salvatore wrote 54 lines
Burkhard Carstens wrote: > Am Mittwoch, 23. Juli 2008 10:35 schrieb Emmanouil Paissios: > >> Hi all, >> >> I recently developed a program using lazarus and observed that the >> same executable for windows, performs completely faulty computations >> in a specific computer to which, unfortunately, I do not have much >> access, since it is the laptop of my supervisor. The aforementioned >> machine runs windows xp, yet in other windows xp and windows 2000 >> versions I've tried, the program worked fine, also under wine. The >> project compiled for linux and mac behaved correctly. >> >> The program only performs various calculations according to a given >> input specified by the gui and plots several charts. No input files, >> no output files and no environment variables are used. >> >> I would appreciate any ideas of why something like this could >> possibly occur. >> > > First thing that comes to mind is different locale setting, i.e. decimal > separator etc. E.g. assuming the gui inputs are some floating point > values entered in edit fields and later converted to float with > StrToFloat, the conversion will fail, if the edit contains "1.23" but > the systems decimal separator is set to "," (like e.g. on a german > system) and thus expects "1,23". > In that case can help to set DecimalSeparator:=','; ThousandSeparator:='.'; or viceversa at main form create event Regards Salvatore > regards > Burkhard > > > _______________________________________________ > Lazarus mailing list > > http://www.lazarus.freepascal.org/mailman/listinfo/lazarus > > _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email