Re: Number of decimals
"floobydoo2000" <[email protected]>
| Newsgroups | gmane.comp.windows.gui4cli |
|---|---|
| Message-ID | <[email protected]> |
I forgot to mention that I placed another copy of the eval.zip file in the Temp directory. In this case I named it eval1.1.001.zip. I have also now tested a syntax error on the dbl command and the result is "@" as I expected. Thanks Mike --- In [email protected], "floobydoo2000" <michael.bernas@...> wrote: > > Hi Fred, > Thanks for the project file. I was able to recompile on my own without trouble. I found that error messages were going to the output window okay. The answer supplied when there was a syntax error was "0". I thought that in these cases it would be better to give a response that was clearly not a legitimate answer to any calculation and change the response to "@" in the event of a syntax error. > > This way, a script could be written to check for an error even in cases where 0 could have been a reasonable answer. > > I should admit I didn't test this with the eval.dbl command. > > Thanks > Mike > > --- In [email protected], "fredfjord@" <fredfjord@> wrote: > > > > Hi Mike, > > > > The functions are in math.h, i forgot to include them, i added this include and will upload the files. > > I knew there was a reason for putting it in the Temp folder :) > > You can ask what you want, if i know the answer i will give it or try to find out. > > I added the project file (eval.ppj) this start PellesC, with Ctrl+B you build the project and for debugging i enable the lg function (log in short but log is already used). > > For me it is also to learn so no time table needed :) > > > > Regards, > > Fred. > > > > > > > > --- In [email protected], "floobydoo2000" <michael.bernas@> wrote: > > > > > > I found that we all have G4C_API.h, but no hint of transendental functions or power functions. If you are tired of this Fred, I think I might have a go. Although I did say that C compilers give me trouble I can usually manage if I have a start like you've given me as well as the actual compiler that was used to compile the original. > > > > > > I'm kind of slow, so this will likely take me 2 or 3 weeks. It's recreational after all and I'm in no hurry. > > > > > > Any hints will be welcome. > > > > > > There is one other thing, I got results of -1, 288, and -65287 (-65 thousand and something, anyway) with no error message or crash as a result of the error. A clue as to how to handle that will be very welcome. > > > > > > Thanks > > > Mike > > > > > > --- In [email protected], "floobydoo2000" <michael.bernas@> wrote: > > > > > > > > Thanks Fred, > > > > > > > > I've tried it out and it works as expected, with a couple of (also expected) new app glitches. Only the +,-,/, and* functions work. This is enough for the code that Frans showed he was having trouble with. > > > > > > > > I looked at the eval.c program and saw that functions like sin, cos, tan, ^, and ln were used, but could not figure out where they were defined. I haven't got a copy of the G4C_API.h file. Are there prototypes for these functions there? > > > > > > > > Thanks > > > > Mike > > > > > > > > --- In [email protected], "fredfjord@" <fredfjord@> wrote: > > > > > > > > > > Hi Frans, Mike, > > > > > > > > > > I placed Eval.zip in the Temp folder. > > > > > I made it just to learn so it is not fully tested so i placed it in the Temp folder. > > > > > Perhaps you want to try it, this is how it can be used: > > > > > eval.dbl A5 ($A5*$A8/$B2) > > > > > B3=$A5 > > > > > eval.setformat ".10f" > > > > > eval.str F (1-$C4+$B3) > > > > > say "Answer is $F" > > > > > > > > > > The eval.dbl stores the result as a string in a hex format, not usable for people but no loss off precision for further calculations. > > > > > > > > > > Regards, > > > > > Fred. ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/gui4cli/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/gui4cli/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/