1. RE: What the heck does this mean?
- Posted by Brian Broker <bkb at cnw.com> Jan 29, 2004
- 351 views
Looks to me like a conflict between function parameter 'length' and Euphoria base function 'length()'. -- Brian Jonas Temple wrote: > > > Okay, I'm stumped. I've got the following routine: > > global function ecarc_rtvDataArea(sequence system_name, sequence > data_area_lib, > sequence data_area, atom starting_pos, > atom length, sequence dtaara_def) > > sequence parm_str > atom parm_length > > parm_length = length(dtaara_def) > -- We'll need to form the BEGSTR sequence using the parameter structure > -- supplied to this routine > parm_str = ecarc_makeStructure(QWCRDTAA_RtnVar & dtaara_def, > "DTAARA_RcvVar") > parm_str &= QWCRDTAA > -- Call the retrieve data area API > parm_str = ecarc_call(system_name, "*LIBL", "QWCRDTAA", parm_str) > -- If the parms returned is a sequence, return the 8th parm for the > length > -- of the passed parm structure > if sequence(parm_str) then > return parm_str[8..(8 + parm_length - 1)] > else > return "" > end if > > end function > > That when included in a program (a rather large proram), generates the > following error: > > C:\Program Files\F.R.O.G. for IBM iSeries DB2\eucarc.ew:1025 > Syntax error - expected to see possibly 'end', not '(' > parm_length = length(dtaara_def) > ^ > If I comment the line out it runs fine. > > HELP!!!!!!!!!!!!!!!1 > > > Jonas >
2. RE: What the heck does this mean?
- Posted by Brian Broker <bkb at cnw.com> Jan 29, 2004
- 344 views
Well, apparently you *can* as long as you're not using the function length() in your routine. But just replace "atom length" with "atom len" or something... euphoric wrote: > > > Brian Broker wrote: > > > > >Looks to me like a conflict between function parameter 'length' and > >Euphoria base function 'length()'. > > > >-- Brian > > > >Jonas Temple wrote: > > > > > >>Okay, I'm stumped. I've got the following routine: > >> > >>global function ecarc_rtvDataArea(sequence system_name, sequence > >>data_area_lib, > >> sequence data_area, atom starting_pos, > >> atom length, sequence dtaara_def) > >> > >> > You can't have an "atom" named "length," right? > >
3. RE: What the heck does this mean?
- Posted by CoJaBo <cojabo at suscom.net> Jan 29, 2004
- 362 views
"atom length", thats the problem, It thinks you are using the atom, not the function. Jonas Temple wrote: > > > Okay, I'm stumped. I've got the following routine: > > global function ecarc_rtvDataArea(sequence system_name, sequence > data_area_lib, > sequence data_area, atom starting_pos, > atom length, sequence dtaara_def) > > sequence parm_str > atom parm_length > > parm_length = length(dtaara_def) > -- We'll need to form the BEGSTR sequence using the parameter structure > -- supplied to this routine > parm_str = ecarc_makeStructure(QWCRDTAA_RtnVar & dtaara_def, > "DTAARA_RcvVar") > parm_str &= QWCRDTAA > -- Call the retrieve data area API > parm_str = ecarc_call(system_name, "*LIBL", "QWCRDTAA", parm_str) > -- If the parms returned is a sequence, return the 8th parm for the > length > -- of the passed parm structure > if sequence(parm_str) then > return parm_str[8..(8 + parm_length - 1)] > else > return "" > end if > > end function > > That when included in a program (a rather large proram), generates the > following error: > > C:\Program Files\F.R.O.G. for IBM iSeries DB2\eucarc.ew:1025 > Syntax error - expected to see possibly 'end', not '(' > parm_length = length(dtaara_def) > ^ > If I comment the line out it runs fine. > > HELP!!!!!!!!!!!!!!!1 > > > Jonas >
4. RE: What the heck does this mean?
- Posted by rudy toews <rltoews at ilos.net> Jan 29, 2004
- 361 views
Jonas Temple wrote: > > > Okay, I'm stumped. I've got the following routine: > > global function ecarc_rtvDataArea(sequence system_name, sequence > data_area_lib, > sequence data_area, atom starting_pos, > atom length, sequence dtaara_def) > > sequence parm_str > atom parm_length > > parm_length = length(dtaara_def) > -- We'll need to form the BEGSTR sequence using the parameter structure > -- supplied to this routine > parm_str = ecarc_makeStructure(QWCRDTAA_RtnVar & dtaara_def, > "DTAARA_RcvVar") > parm_str &= QWCRDTAA > -- Call the retrieve data area API > parm_str = ecarc_call(system_name, "*LIBL", "QWCRDTAA", parm_str) > -- If the parms returned is a sequence, return the 8th parm for the > length > -- of the passed parm structure > if sequence(parm_str) then > return parm_str[8..(8 + parm_length - 1)] > else > return "" > end if > > end function > > That when included in a program (a rather large proram), generates the > following error: > > C:\Program Files\F.R.O.G. for IBM iSeries DB2\eucarc.ew:1025 > Syntax error - expected to see possibly 'end', not '(' > parm_length = length(dtaara_def) > ^ > If I comment the line out it runs fine. > > HELP!!!!!!!!!!!!!!!1 > > > Jonas > jonas i believe it has to do with your lengthy argument list. somehow the interpreter is breaking it in half and expecting a matching parenthesis. maybe even caused by editor? (invisible character) try to put arguments into 2 different ones, 1 seq of sequences and 1 sequence of atoms. also add extra characters to names if you want to use language keywords -- length to become vlength later rudy lotterywars
5. RE: What the heck does this mean?
- Posted by Ron Austin <ronaustin at alltel.net> Jan 29, 2004
- 369 views
rudy toews wrote: > > > Jonas Temple wrote: > > > > > > Okay, I'm stumped. I've got the following routine: > > > > global function ecarc_rtvDataArea(sequence system_name, sequence > > data_area_lib, > > sequence data_area, atom starting_pos, > > atom length, sequence dtaara_def) > > > > sequence parm_str > > atom parm_length > > > > parm_length = length(dtaara_def) > > -- We'll need to form the BEGSTR sequence using the parameter structure > > -- supplied to this routine > > parm_str = ecarc_makeStructure(QWCRDTAA_RtnVar & dtaara_def, > > "DTAARA_RcvVar") > > parm_str &= QWCRDTAA > > -- Call the retrieve data area API > > parm_str = ecarc_call(system_name, "*LIBL", "QWCRDTAA", parm_str) > > -- If the parms returned is a sequence, return the 8th parm for the > > length > > -- of the passed parm structure > > if sequence(parm_str) then > > return parm_str[8..(8 + parm_length - 1)] > > else > > return "" > > end if > > > > end function > > > > That when included in a program (a rather large proram), generates the > > following error: > > > > C:\Program Files\F.R.O.G. for IBM iSeries DB2\eucarc.ew:1025 > > Syntax error - expected to see possibly 'end', not '(' > > parm_length = length(dtaara_def) > > ^ > > If I comment the line out it runs fine. > > > > HELP!!!!!!!!!!!!!!!1 > > > > > > Jonas > > > > jonas > i believe it has to do with your lengthy argument list. > somehow the interpreter is breaking it in half and expecting a matching > parenthesis. maybe even caused by editor? (invisible character) > try to put arguments into 2 different ones, 1 seq of sequences and 1 > sequence of atoms. > also add extra characters to names if you want to use language keywords > -- length to become vlength > > later > rudy > lotterywars > I think the error has been pointed out, but I'll add my two cents worth. The Euphoria manual has this: 2.4.1 Identifiers Identifiers, which consist of variable names and other user-defined symbols, may be of any length. Upper and lower case are distinct. Identifiers must start with a letter and then be followed by letters, digits or underscores. The following reserved words have special meaning in Euphoria and may not be used as identifiers: and end include to by exit not type constant for or while do function procedure with else global return without elsif if then xor I think at least one word, LENGTH is missing from this list. There may be more words missing.
6. RE: What the heck does this mean?
- Posted by "Derek Parnell" <ddparnell at bigpond.com> Jan 30, 2004
- 365 views
> -----Original Message----- > > Jonas Temple wrote: > > > > > > Okay, I'm stumped. I've got the following routine: > > > > global function ecarc_rtvDataArea(sequence system_name, sequence > > data_area_lib, > > sequence data_area, > atom starting_pos, > > atom length, sequence > dtaara_def) > > > > sequence parm_str > > atom parm_length > > > > parm_length = length(dtaara_def) > > -- We'll need to form the BEGSTR sequence using the > parameter structure > > -- supplied to this routine > > parm_str = ecarc_makeStructure(QWCRDTAA_RtnVar & dtaara_def, > > "DTAARA_RcvVar") > > parm_str &= QWCRDTAA > > -- Call the retrieve data area API > > parm_str = ecarc_call(system_name, "*LIBL", "QWCRDTAA", > parm_str) > > -- If the parms returned is a sequence, return the 8th > parm for the > > length > > -- of the passed parm structure > > if sequence(parm_str) then > > return parm_str[8..(8 + parm_length - 1)] > > else > > return "" > > end if > > > > end function > > > > That when included in a program (a rather large proram), > generates the > > following error: > > > > C:\Program Files\F.R.O.G. for IBM iSeries DB2\eucarc.ew:1025 > > Syntax error - expected to see possibly 'end', not '(' > > parm_length = length(dtaara_def) > > ^ > > If I comment the line out it runs fine. > > > > HELP!!!!!!!!!!!!!!!1 > > > > > > Jonas > > > The problem is that one of the parameters is called 'length' and when you use "parm_length = length(dtaara_def)" Eu thinks that you are referring to the parameter and not the built-in function. Renaming this parameter fixes the problem. -- Derek