CompuServe Thread

Forum unknown · Modula-2

#TDI Upgrade

3 messages in this thread
#101606From: Steve FaiwiszewskiJan 4, 1988 9:10 PM
Please do upload the time and date (and string parsing) manipulation modules; it's always nice to have such code around. You can access the FFP library using the TDI M2 package, but you gotta do it yourself. In other words, you can't just simply declare a REAL and use it; you gotta declare some type which has the same size as the FFP reals, and you gotta open the FFP library and make explicit function calls to it to do the most rudimentary things (such as add, subtract, multiply and divide, not to mention trig and log functions). I haven't done this in Modula yet, but there's quite a bit of code showing how to do this for the Lattice C compiler. – Steve –
#101638From: Mark OlbertJan 4, 1988 11:13 PM
Hmmm…how do you tell the compiler that FFPAdd (for example) is a valid 'external' function? In C you can do that by just saying so, since the C compiler generally couldn't give two hoots about whether or not a referenced external function actually exists. In M2 I think it might be more difficult because the compiler checks a function's syntax as specified in the EXPORTing symbol file. But then again it might be worth a shot. As to the time and date stuff, I'll upload it 'as is' and if I ever get around to it I'll document it separately. #>Mark<#
#101638From: Mark OlbertJan 4, 1988 11:13 PM
Hmmm…how do you tell the compiler that FFPAdd (for example) is a valid 'external' function? In C you can do that by just saying so, since the C compiler generally couldn't give two hoots about whether or not a referenced external function actually exists. In M2 I think it might be more difficult because the compiler checks a function's syntax as specified in the EXPORTing symbol file. But then again it might be worth a shot. As to the time and date stuff, I'll upload it 'as is' and if I ever get around to it I'll document it separately. #>Mark<#