Stringer 0 Posted November 3, 2003 Report Share Posted November 3, 2003 Try following: class TEST { public: char TestThis(); void WithThis(); }; char TEST::TestThis() { return 10; } void TEST::WithThis() { while(TestThis() != 10 ); } It should produce "Undefined identifier 'TestThis'" -error from the compiler. Quote Link to post Share on other sites
Guest Pavel Posted November 3, 2003 Report Share Posted November 3, 2003 Will look into this. A workaround is to use the 'for' loop: char i; for( i = TestThis(); i != 10; i = TestThis() ); Regards, Pavel Quote Link to post Share on other sites
Stringer 0 Posted November 3, 2003 Author Report Share Posted November 3, 2003 Probably related to this issue, it looks like the compiler sometimes forgets to insert proper symbol defination to the assembler file for local variables in the returning functions. For example, following line were missing: _temp_Read equ 0x5e;1 Its still little unclear to me, why it doesn't insert that anymore. However, this is what I did before the problem: 1. I added one public variable to the class 2. I added a "if variable != 1" to one of my methods. The method (WaitUntilNotBusy) has a callback to another method with char returning (mehod Read). 3. lastly I added a callback to WaitUntilNotBusy in a third method (write_instruction) It does seem to have no effect if the Read function is global or in the class. The code is partially from the LCD example, in a class. Quote Link to post Share on other sites
Guest Corki Posted November 6, 2003 Report Share Posted November 6, 2003 try this class TEST { public: void WithThis(); char TestThis(); }; Corki Quote Link to post Share on other sites
Stringer 0 Posted November 6, 2003 Author Report Share Posted November 6, 2003 try this class TEST { public: void WithThis(); char TestThis(); }; Corki That doesn't do any difference. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.