Path: utzoo!utgpu!watserv1!watmath!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!wuarchive!csus.edu!ucdavis!csusac!csuchico.edu!RGOLDSTONE@OAVAX.CSUCHICO.EDU From: rgoldstone@OAVAX.CSUCHICO.EDU (Robin Goldstone) Newsgroups: comp.sys.mac.hypercard Subject: more 2.0 probs - number precision, file operations Message-ID: <009406E0.A248D460@OAVAX.CSUCHICO.EDU> Date: 29 Nov 90 16:57:21 GMT Sender: news@ecst.csuchico.edu (USENET) Reply-To: rgoldstone@OAVAX.CSUCHICO.EDU (Robin Goldstone) Organization: California State University, Chico Lines: 53 Hi- I posted earlier about several problems I was having with a stack I converted to HC 2.0 format. The stack is a front end for an Oracle database. I have discovered even *more* problems with the stack. I am getting extremely frustrated that so many thing are breaking! Here are my two current problems: 1) I have a card that represents an "invoice". The user fills in some stuff and my script calculates the total invoice amount (i.e. adds up item prices * quantities and calculates sales tax and total invoice amount). All of a sudden the user noticed that sales tax was not being computed correctly. Our sales tax is 6.025%. In my stack, I have: put .0625 into taxRate When I debug the script, the variable watcher shows that taxRate contains .06. Has something changed regarding default number precision? Where are my other two significant digits?! Do I have to somehow tell HC what precision I want? 2) another card is a "report writer". It extracts records from the Oracle DB and writes them to a text file. The structure is: open file, write records, close file. Pretty standard stuff. Well, now when this script gets to the "close file" statement, I get a dialog box stating "No open file named "xxx". In other words, it is telling me the file is somehow already closed! This is strange. I have debugged the script but can't figure out what the problem is. The file is successfully opened and all the records are written. It is just somehow getting closed before I can close it! Here is a chunk of the script: put "hard:ls:CUSTOMER REPORT" into fileName open file fileName execsql "get next row" <-- oracle command to extract a record repeat forever repeat with i = 5 to 14 put card field i & tab after tempRec end if end repeat put return after tempRec write tempRec to file fileName execsql "get next row" if the result <> 0 then <-- means no more records found close file fileName <-- this is where it bombs out! exit repeat end if put empty into tempRec end repeat Sorry this is so long, but I am desparate to solve these problems... Please keep in mind that these things all worked correctly at HC 1.2.5. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Robin Goldstone, Systems Software Specialist | | California State University, Chico Computing Services | | rgoldstone@oavax.csuchico.edu | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+