Error Msg : Unmatch control word - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: Error Msg : Unmatch control word (/thread-2799.html) |
Error Msg : Unmatch control word - bobkrohn - 01-05-2015 02:13 AM I received an error message "Unmatch control word" What does that mean? Is there a listing of error message definitions somewhere? I tried running the program in Debug and it just crashes the Prime. The main program was running when I had all Subroutines as separate files. (about 80) That was until I restored the Prime, then it forgot how to access them. Then I attempted to paste them all into one big program file. Now this. RE: Error Msg : Unmatch control word - eried - 01-05-2015 03:00 PM That looks like a missing closure keyword (example, some unclosed FOR block, etc). Post your code here. RE: Error Msg : Unmatch control word - bobkrohn - 01-05-2015 07:25 PM Thanks for your concern. Let me look into that possible problem first before posting source. The main program is a work in progress. 77 declared functions 2663 lines of code It's a Land Surveying App I've just about lost my patience with the Prime as it's so bug filled. Calculator, Emulator and Connectivity Kit. Lack of proper programming documentation. Driver problems for connecting to PC. The list goes on and on. Apparently it's not even a Beta version after being on the market for a year. I just bought it a month ago. I'll wait for the next overall update before smashing it with a hammer. I've been programming in VB6 (on PC) since it came out. Wrote some commercial programs too. Not a novice. In 15 years there were only, at most, 2-3 bugs discovered in my programs. HP is not HP anymore. RE: Error Msg : Unmatch control word - Tim Wessman - 01-05-2015 08:19 PM You don't have to put everything in one file. Generally that will be easier though. What really is critical is that the parser needs to know if something is a function when it hits it for the first time. Putting something like: MyFunc(a,b,c); At the top of a file works fine. What happens when you press the CHECK button in your program editor? Normally it goes to the exact location the error is at or begins. RE: Error Msg : Unmatch control word - bobkrohn - 01-06-2015 12:06 AM I originally had all Subroutines as separate entities. But, when I did a BackUp then Restore, all the calls to the Subroutines would not work. They all worked fine before the BackUp then Restore. Apparently, they all need to be "recompiled", or whatever it's called in HP. My understanding is that there are "hidden" executables attached to each listed program. You have to open and close each one to "recompile". That would require manually visiting each of the 70+ subs/programs. Someone suggested including all the subroutines into one big file. That's what I did. In the Connectivity Kit. I Copied/Pasted each one and wrote name down on paper to check myself. Low and behold, random subroutines would go missing from the big file as I tried to run the big main "Mother Program". Was able to recover them from previous BackUps, make a new .zip file and Restore that. Did it at least 3 times for three different Subs. (No way did I drop 3 on my own) The "Mother Program" seems to call the Subs OK however, so that's good. I get no errors when I do the Check in Program Editor. I may have located the source of the "Unmatch control word" msg. Another Sub that had gone missing. It was on my handwritten check list. I was able to locate the Call by observing what the program was attempting to do when it bombed. Yup, missing Sub. Error WAS NOT located by an informative HP-Prime generated error message showing line number, etc. The other immediate problem now is the capricious way that String Variable Input is working. I've gone around and around with this. Soon as I gather some steam I'll try a different tack on that too. Don't use String Variables for input. I had to do that with the same silly buggy behavior of the Shift DMS key for input. I gave up and wrote some Subs to take the old "HP-41" input style, i.e. 45.15301234 for 45° 15’ 30.1234”. Actually, it's less trouble to key in now. (Yes, I know you can use the Template Menu Key) What I'm scared of is the "missing Subs" problem may be a symptom of something more evil. Random scrambling/deleting of code within a Sub. Program Editors sure could use a Find and a Find-Replace features. Especially in the Connectivity Kit. Anyone with even a beginners level of expertise would know that that is a necessary function. RE: Error Msg : Unmatch control word - compsystems - 01-06-2015 12:27 AM sorry for my bad English Error Msg : Unmatch control word this happens sometimes when a function is not defined, and tries to call or function that not belongs to HOME or CAS mode Is hard build n programs or subrutines in a single file, it is best to create separates functions. but this requires an external editor PrimeComm is a external program editor project, which is stopped = (. /!\ some instructions do not operate in certain modes (CAS/HOME), the good thing is that you can now specify CAS (#cas ... #end) and not CAS in a single file An example Code: #cas /!\ The getMode_angle function can not be defined in CAS MODE, requires be outside, in the above code if I move the instruction (#end) to end, the code generates an error and does not say that part, I take long time to discover. I'm happy with the evolution of the HP-Prime =), the issue is time. I think the more power is more complex programming RE: Error Msg : Unmatch control word - Han - 01-06-2015 01:20 PM I have a slightly different work flow that works well for me, if you would like to give it a try. Rather than relying on the connectivity software, I do most of my development on the virtual calculator. Or if the project is really large and I need a bigger window to view the code, I type my code using a text editor. Then I simply copy the code into the virtual calculator, use CHECK, and then run it from there. Once all is done, I send directly from virtual calculator to the real hardware. I also copy from virtual calculator back to my text editor to update any changes I made on the virtual calculator that were needed in order to compile correctly. Even if the virtual calculator somehow crashes, you should still have your code in one of the HP Prime folders where it stores all its data. On Windows, a crash will restart the virtual calc using a different state; just close it out and re-run the virtual calculator and it should start with the previous state. |