[fpc-pascal] RE: Possibly a dumb question.... (Jennifer Usher)

2009-12-28 Thread Jeff Miller


 I have been trying to compile a simple test program and I keep getting
 the following errors:

c:\lazarus\fpc\2.2.4\bin\i386-win32\windres.exe: can't open file
`project1.manifest': No such file or directory

I am about a week ahead of you with Lazarus, and I struggled
with that error too. It seems you must save the project once
before you can compile it.  After the first save, you can make
changes and recompile without saving again, but that
first save seems to be crucial.

Jeff Miller (Otago)___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Special math. functions (erf, erfc, ...)

2006-12-17 Thread Jeff Miller

This is slightly off-topic, but nonetheless somewhat
relevant to these special math functions...

Can anyone explain what is the precision of fpc's
built-in math functions like sqrt, ln, exp, and so on?

According to the online documentation, these take
a ValReal argument and return a ValReal result:
  e.g.:  function sqrt(d: ValReal):ValReal;
But what exactly is a ValReal?  Real? Double? Extended?

It would be ideal if these math functions would take arguments
of different precision and return results in the same precision.
Is that what happens?

I am asking because I need extended precision versions
of sqrt, etc, and I do not believe fpc provides that
(at least by default).  I have seen the mpcalc unit,
but I was hoping for a solution that doesn't involve
a special unit (with special coding).

Thank you for any information or suggestions...

Jeff

[EMAIL PROTECTED]


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Precision of sqrt, exp, ln, etc?

2006-08-27 Thread Jeff Miller

I am wondering about the precision of the
functions like sqrt, ln, exp, and so on.

According to the online documentation, these take
a ValReal argument and return a ValReal result:
e.g.:  function sqrt(d: ValReal):ValReal;
What is ValReal?  (It would be ideal if these
functions would take arguments of different precision
such as double or extended and return results
in the same precision!)

Basically, I need extended precision versions
of these and a few other math functions, so...
If these functions do not operate in the highest
precision, are there other functions with higher
precision (eg some fortrans have a double-precision
dsqrt, etc)?

I have seen the mpcalc unit, but I was hoping
for something a little faster if possible.

Thank you for any information or suggestions...
Jeff

[EMAIL PROTECTED]

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal]size/speed/compiler - Was:another fpc RAD: MSEide

2006-04-19 Thread Jeff Miller

   3. speed - not a big deal. Hardware cheap enough.
 
 Speed definitely does matter for some apps: application servers,
 database servers etc. So you can't generalize this.

I'll have to agree with the second comment, not the first.

I use fpc for statistical simulation programs, many of which run
for 6 weeks or more (with different pieces of the simulation
running in parallel on 6-8 different PCs).  From my experience
with interpreted systems, these projects would take _years_
on the even fastest of those.

fpc is a great tool--much appreciated!

Jeff

[EMAIL PROTECTED]


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Better random numbers ?

2006-02-26 Thread Jeff Miller
 Hi, I am using standard run of the mill randomize/random() calls in a program 
 to generate random numbers, used in turn to select random data which is fed 
 into another program.

You are just supposed to call randomize once, to initialize the random
number generator.  You then call random over and over, and a different
random number gets generated from each successive call.  The random
call modifies the stored seed so that repeated calls give different answers.
I can see how this might not work so well when you are calling the
program over and over again (i.e., restarting it).

One option is to have the random # generator program generate a large
batch of numbers that are saved to a file, and you only call it again when
the calling program has used up that batch.  (If you are working in windows,
you might look at the randgen program, freely available at 
http://www.winsite.com/bin/Info?1700036826
which can be used like this.)

Another option is to have the random # generator program return its
new seed value as well as its random number.  When you call it again,
you pass it the seed value that it last returned, and the random #
generator program sets the seed to that value without calling randomize
again.

I hope something here useful to you... 
Jeff

[EMAIL PROTECTED]


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: Can a program find out how it was started?

2005-08-03 Thread Jeff Miller
Is it possible for a program to tell whether it was started 
from the command line or started by double-clicking on the 
application icon?
 
 If you want to use Win API calls, I think 
 this would be a better (and simpler) way to do it:
 
 
 {===}
 program contest;
 uses windows;
 
 var
   info:tSTARTUPINFO;
 
 begin
   GetStartupInfo(@info);
   if ( info.hStdInput = 0 ) 
   then {Started from Explorer} 
   else {Started from Console}
 end.
 {===}

This looks really attractive, but it doesn't work.
I get the same value of info.hStdInput (4294967295)
whether I run the program from the console or explorer.

So far I have been unable to find any information
on the fields of tSTARTUPINFO, so I can't figure out
how to elaborate on this idea.  (Google gives lots of hits, but they all
just seem to use tSTARTUPINFO, not to document it.)
If you have any further guidance on that, I'd appreciate it.

Thanks for your efforts, in any case.

Jeff Miller



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] undefining multiple defines

2005-03-02 Thread Jeff Miller
 I'm using several defines like this:
 
 {$define M1}
 { $define M2}
 { $define M3}
 { $define M4}
 
 Any time I have to change them, I have to touch all one by one, because
 they're mutually exclusive.
 
 Or a better basic approach? 

Maybe I am missing something, but why not just have a single define statement, 
which you change to 
define the one symbol that you want for the current compile? If they are 
mutually exclusive, you 
never need more than one define, right?

Jeff

[EMAIL PROTECTED]



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal