David.Slonosky@QueensU.CA (02/12/90)
Hello. I'm trying to figure out the floating point architecture in Draco. I include the "float.g" at the very start of my program and it compiles fine, but BLink tells me that there's an unrecognized object _MathDoubBasBase at the beginning of the drstart.o file. I'm using the "ex dr1" syntax for linking the resource file. When I try to run the executable, it gurus after I enter the first number (readln(num); , where I assigned "num" as type Float). I've tried entering them both as integers (12) and what I call "real" numbers (12.), but no go, it gurus out either way. Part of my problem is my unfamiliarity with compileable languages, and part with my understanding of the documentation. I assumed that since the docs say it accesses the mathieeedoubbas.library as a run-time library that it would try and access that during the execution of the program. Am I missing some syntax in the BLink command? I realise this is a pretty Mickey Mouse question, but then so is my knowledge of compileable languages. :-) On another note, what's the proper format for inputting complex numbers using the supplied routines? How would you enter 4+5i, for example?
cg@ami-cg.UUCP (Chris Gray) (02/19/90)
In <3546*David.Slonosky@QueensU.CA> David.Slonosky@QueensU.CA writes: >Hello. I'm trying to figure out the floating point architecture in Draco. I >include the "float.g" at the very start of my program and it compiles fine, >but BLink tells me that there's an unrecognized object _MathDoubBasBase at the >beginning of the drstart.o file. I'm using the "ex dr1" syntax for linking >the resource file. When I try to run the executable, it gurus after I enter >the first number (readln(num); , where I assigned "num" as type Float). I've >tried entering them both as integers (12) and what I call "real" numbers >(12.), but no go, it gurus out either way. >Part of my problem is my unfamiliarity with compileable >languages, and part with my understanding of the documentation. >I assumed that since the docs say it accesses the mathieeedoubbas.library as a >run-time library that it would try and access that during the execution of the >program. Am I missing some syntax in the BLink command? I realise this is a >pretty Mickey Mouse question, but then so is my knowledge of compileable >languages. :-) >On another note, what's the proper format for inputting complex numbers using >the supplied routines? How would you enter 4+5i, for example? Your main problem here is not paying close enough attention to the cruddy documentation that I provided :-). If you are using floating point, you must link with the startup file 'drstartf.o', which opens the floating point libraries before calling your 'main'. This is done by using "ex drf1" instead of "ex dr1". A guru is exactly what to expect when you call a library that you have not opened. ANY use of floating point values will cause this problem, since computations, input and output all require the library. The compiler itself uses the library to handle things like "5.0" in the program, but it opens the library before it needs it. Another possible problem is BLink. The version I supplied with Draco is an old one (the latest one I have that I know to be PD, however). It quite often produces an object file that is invalid, especially when you link in the floating point stuff. If you can beg or borrow a newer version, you will have better luck using floating point with Draco. My current thinking is that I will bang together a simple linker for use with Draco, in between coming up with some decent documentation for the whole system. Complex numbers can be input at run time using the standard (at least as far as I know!) computer format for them. Your example of 4+5i could be entered as any of: "(4.0,5.0)", "(4.,5.)", "4.,5.", "( +4.500, +5.E+0 )", etc. In general, an easy way to find out what input requirements are is to try to output the same value and see what it looks like. -- -- Chris Gray usenet: {uunet,alberta}!myrias!ami-cg!cg CIS: 74007,1165