1. problem

I have a function in my program which continually gets the following error:function getseq( sequence xz ) ^0037 a type is expected here(the ^ appears under the 1st e in sequence... WHY WHY WHY WHY WHY??

new topic     » topic index » view message » categorize

2. Re: problem

eddo said...

I have a function in my program which continually gets the following error:

function getseq( sequence xz ) 
                  ^0037 a type is expected h 
                  (the ^ appears under the 1st e in sequence... 
                   WHY WHY WHY WHY WHY?? 
                   !!"sequence" IS a type,dammit! 

Hi eddo,

I reformatted your post a bit to make it easier to read. You need to give us a little more information for us to be able to help you. How about giving us the function definition (if it's not too long)? Be sure to use the eucode tags for proper fomatting. If the function is too long you can use the Pastey link to the right.

Lonny

new topic     » goto parent     » topic index » view message » categorize

3. Re: problem

It sounds like you have overridden sequence to be something else, or maybe there is a rogue "sequence sequence" somewhere.
It may be right there in front of you, between the () of your getseq function (managed that one a few times myself).
If you can't find it, put a copy of the source on a Pastey and someone else will.

Pete

new topic     » goto parent     » topic index » view message » categorize

4. Re: problem

OK-here 'tis

function getseq( sequence xz ) 
sequence ret={},vs 
object xx 
integer ind=0 
    while ind+1<=length(xz) do 
	vs = value(xz,1+ind,GET_LONG_ANSWER) 
	if vs[1]=GET_SUCCESS then 
	    ret&=vs[2] 
	    ind+=vs[3]+1 
	    if length(ret)>=3 then 
		exit 
	    end if 
	else 
	    beep() 
	    text_color(BRIGHT_RED) 
	    puts(1,"ERROR - on getting parts of ") 
	    printf(1,"%s",{z}) 
	    abiquit(0) 
	end if 
    end while 
return ret 
end function 
--getseq()------## 
new topic     » goto parent     » topic index » view message » categorize

5. Re: problem

OK, I'll have a go at this, often a different pair of eyes will spot a problem...
Please give us a example sequence you are passing to your function?

new topic     » goto parent     » topic index » view message » categorize

6. Re: problem

eddo said...

I have a function in my program which continually gets the following error:function getseq( sequence xz ) ^0037 a type is expected here(the ^ appears under the 1st e in sequence... WHY WHY WHY WHY WHY??

Hi

maybe, the bug is not in your function.

Example:

This code...

sequence f, 
sequence  
 
function getseq( sequence xz )  
	return xz 
end function  
 

gives this error:

C:\develop\designer\getseq.exw:4 
<0037>:: a type is expected here 
function getseq( sequence xz ) 
                            ^ 

Hope this help

Andreas

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu