function has me stumped

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
demac43
Newbie
Posts: 7
Joined: Wed Mar 09, 2005 9:58 pm
Location: Australia

function has me stumped

Post by demac43 » Sun Mar 20, 2005 7:33 am

Hi all,
my visual basic is real weak and am trying to work out how to use the functions as given in the examples.
can't get the following to work

function Upper(S: string): string

keep getting MS VBScript error :1006 Expected ')' Line 10, Column 17

anyone give me a little script to demonstate it to me?

thanks in advance

demac

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Sun Mar 20, 2005 9:05 am

There is no VBscript function called Upper. I think you are thinking of UCase:

//Empty VBSTART/VBEND block just to tell script to use VBScript
VBSTART
VBEND
Let>str>Hello World
VBEval>UCase("%str%"),str
MJT Net Support
[email protected]

demac43
Newbie
Posts: 7
Joined: Wed Mar 09, 2005 9:58 pm
Location: Australia

confused

Post by demac43 » Mon Mar 21, 2005 9:03 am

back again -

what then are these so called functions as shown in the Help file >command reference >complex expresions>string functions

regards demac

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Mon Mar 21, 2005 9:22 am

Ah - you mentioned VBScript so I thought you meant the UpperCase function. The complex expression functions can be used in If> or Let> statements:

Let>somestring=freddy
Let>somestring={Upper(%somestring%)}

This will set somestring to FREDDY.
MJT Net Support
[email protected]

demac43
Newbie
Posts: 7
Joined: Wed Mar 09, 2005 9:58 pm
Location: Australia

I see the light

Post by demac43 » Mon Mar 21, 2005 9:28 am

Thanks for your swift reply.

I assumed it was vb script, now i understand how it is implemented.

regards demac

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts