ahaas@silver.ecn.purdue.edu (Alan Haas) (06/28/90)
After a two week wait, TC++ 1.0 arrived in the mail. After a weeks use, I can say that I am very impressed with the product. However, I seem to be having problems with programs that worked under TC 2.0 with no problems. In a number crunch intensive routine running with TC++, a runtime error of Stack Fault is given. In TC 2.0, no such problem occurs with the exact same program and data. What I would like to know is: 1. Does anybody else have trouble in using old TC 2.0 programs that have problems with TC++ 2. Would people please give suggestions on what may be causing the problem. for ( i=0 ; i<nvar ; i++ ) for ( j=0 ; j<nconst, j++) mat[i][j] = a[j][i]*diag[j]*diag[j]; everything is declared correctly. nvar = 7 nconst = 11 at i = 2 j = 0 a[j][i] = 2.0 diag[j] = .0045 I have checked this with evaluate in the IDE. This is as things should be. At i = 2 and j = 0 the program halts and a Stack Fault message is given. TC 2.0 worked just fine, but TC++ choked. I looked up the error in the manual, but I was given no clue that I could use ( my inability ). Since question #2 is not likely to be of interest to many people, please e-mail comments to me. I will post the solution if I receive it, and if there seems to be interest. Thanks: Alan Haas ahaas@ecn.purdue.edu -- ******** Alan Haas: Fun is all the more so when it is shared. ********
toma@tekgvs.LABS.TEK.COM (Tom Almy) (06/30/90)
Here's a "good one." Borland defines a constant __TURBOC__ that is a hex constant representing the version number. Unfortunately, TC++ gives the value 0x100, just line version 1.0 of Turbo C! There is no __TURBOCPP__ constant which means programs that are compiler dependent (such as to get around bugs) can't differentiate between Turbo C 1.0 and Turbo C++ 1.0. :-( On a more positive note, TC++ compiled and ran with no difficulty the programs that I could never get running under two v1.xx versions of Zortech C++. I don't believe I'll spend the $250 to get the new Zortech package. (If somebody has compared TC++ 1.0 and Zortech C++ 2.x, and feels that the Zortech compiler has merit, let me know!) Tom Almy toma@tekgvs.labs.tek.com Standard Disclaimers Apply
minar@reed.bitnet (Nelson Minar,(???)) (06/30/90)
In article <7740@tekgvs.LABS.TEK.COM> toma@tekgvs.LABS.TEK.COM (Tom Almy) writes: > >Here's a "good one." Borland defines a constant __TURBOC__ that is a hex >constant representing the version number. Unfortunately, TC++ gives the >value 0x100, just line version 1.0 of Turbo C! There is no __TURBOCPP__ >constant which means programs that are compiler dependent (such as to get >around bugs) can't differentiate between Turbo C 1.0 and Turbo C++ 1.0. :-( > But there is a definition of __cplusplus, as per the C++ 2.0 standard. So one CAN differentiate between Turbo C 1.0 and Turbo C++ 1.0. does anyone know why my copy of Turbo C++ Professional was marked "not for export"?