Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Select/Case structure, getting error 1

Status
Not open for further replies.

JasonLord

Technical User
May 9, 2002
33
US
I have the following formula...when I check for errors, it gives me "the remaining text does not appear to be part of the formula" and points to where I have indicated...if I take the stuff out below the select block it's OK...but Ineed that stuff there...what is it seeing...


thanks



local stringvar tmpExtension;
select uppercase({@xxx_File Format (PDF, HTML, Text, Excel)})
case "PDF" : tmpExtension:="pdf"
case "HTML" : tmpExtension:="htm"
case "TEXT" : tmpExtension:="txt"
case "EXCEL" : tmpExtension:="xls"
default : tmpExtension:={@xxx_Export File extension};

//error points here

if uppercase({@xxx_File Format (PDF, HTML, Text, Excel)}) in [&quot;PDF&quot;,&quot;HTML&quot;,&quot;TEXT&quot;,&quot;EXCEL&quot;] and trim({@xxx_Export File extension})<>&quot;&quot;
then tmpExtension:={@xxx_Export File extension};

local stringvar tmpFilename:=filename;

tmpFilename:=strreverse(mid(instr(strreverse(tmpFilename),&quot;/&quot;)));
 
I think you need another ';' in your last row

default : tmpExtension:={@xxx_Export File extension};;

/Goran
 
yep...that was it...now can someone tell me why that chuck needed a double semi colon?

thanks goranm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top