forum-msg-id-131787-edit

Original date:2018-01-06 16:59:58 Edited by: irv Subject: Re: SWITCH question

The problem is definitely in the thread() function: Running with the added printf lines shown below (starting around line 2022 of be_execute.c:

// threaded code 
		if (Executing == FALSE) 
		{ 
			// TODO  XXX might this affect exit code improperly? 
			Cleanup(1); 
			return; 
		} 
		printf("E1a\n"); 
		thread(); 
		printf("E1b\n"); 
		switch((intptr_t)pc) { 

I get

E1a -- note: this is during first phase (parsing?) 
1   -- printed as expected 
1   -- ditto 
E1a -- second parsing (while in switch loop?) 
 
/home/irv/t1.ex:9 
A machine-level exception occurred during execution of this statement (signal 11)  

BTW: adding the -DINT_CODES gave me a world of errors:

/usr/share/euphoria/source/be_execute.c:5470:5: note: in expansion of macro ‘thread2’
thread2();
^
/usr/share/euphoria/source/be_execute.c:785:29: error: lvalue required as left operand of assignment

  1. define thread2() {(long)pc += 2; goto loop_top;}
    ^
Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu