home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2001 January
/
PCWorld_2001-01_cd.bin
/
Software
/
Topware
/
sambar
/
_SETUP.1
/
stmex.stm
< prev
next >
Wrap
Text File
|
1999-08-28
|
2KB
|
77 lines
<HTML>
<HEAD><TITLE>Sambar Scripting Example</TITLE></HEAD>
<BODY bgcolor=#ffffff>
<H1>Sambar Scripting Example</H1>
<B>If/Then Expressions:</B>
<P>
<BLOCKQUOTE>
<RCif RC$foo = null>
<RC$foo = 111>
<RC$bar = 222>
<RCelse>
<RC$foo = RC$foo + 100>
<RCendif>
<RCif RC$foo = null><BR>
<RC$foo = 111><BR>
<RC$bar = 222><BR>
<RCelse><BR>
<RC$foo = RC$foo + 100><BR>
<RCendif><BR>
</BLOCKQUOTE>
<P>
<B>Form Parameters:</B>
<P>
<BLOCKQUOTE>
<RC$foo> = <RC$foo><BR>
<RC$bar> = <RC$bar><BR>
</BLOCKQUOTE>
<P>
<B>Variable Assignment:</B>
<P>
<BLOCKQUOTE>
<RC$tmp = (RC$foo + RC$bar) * 2>
<RC$tmp = (RC$foo + RC$bar) * 2><BR>
<RC$tmp> = <RC$tmp>
</BLOCKQUOTE>
<P>
<B>Scalar Functions:</B>
<P>
<BLOCKQUOTE>
<RC$foo = This is a test string to strip>
<RC$foo = This is a test string to strip><BR>
<RC$pos = RC@grep(RC$foo,string)>
<RC$pos = RC@grep(RC$foo,string)><BR>
<RCif RC$pos > -1>
<RC$tmp = RC@substring(RC$foo, 0, RC$pos)>
<RCelse>
<RC$tmp = Not found>
<RCendif>
<BR>
<RCif RC$pos > -1><BR>
<RC$tmp = RC@substring(RC$foo, 0, RC$pos)><BR>
<RCelse><BR>
<RC$tmp = Not found><BR>
<RCendif><BR>
<BR>
<RC$tmp> = <RC$tmp>
<BR>
<RC$tmp = RC@sprintf("%s---%s", RC$foo, again)>
<RC$tmp = RC@sprintf("%s---%s", RC$foo, again)><BR>
<BR>
<RC$tmp> = <RC$tmp>
<BR>
<RC$foo = RC@left(RC$tmp, 4)><BR>
<RC$foo = RC@left(RC$tmp, 4)><BR>
<RC$foo> = <RC$foo><BR>
<BR>
<RC$foo = RC@right(RC$tmp, 5)>
<RC$foo = RC@right(RC$tmp, 5)><BR>
<RC$foo> = <RC$foo><BR>
<BR>
</BLOCKQUOTE>
<P>
</BODY>
</HTML>