Core.Object | +--Core.Commandlet | +--Core.SimpleCommandlet
int
intparm
Main(string Parms)
TestFunction()
00001 class SimpleCommandlet expands Commandlet; 00002 00003 var int intparm; 00004 00005 function int TestFunction() 00006 { 00007 return 666; 00008 } 00009 00010 function int Main( string Parms ) 00011 { 00012 local int temp; 00013 local float floattemp; 00014 local string textstring; 00015 local string otherstring; 00016 00017 log("Simple commandlet says hi."); 00018 log("Testing function calling."); 00019 temp = TestFunction(); 00020 log("Function call returned" @ temp); 00021 log("Testing cast to int."); 00022 floattemp = 3.0; 00023 temp = int(floattemp); 00024 log("Temp is cast from "$floattemp$" to "$temp); 00025 log("Testing min()"); 00026 temp = Min(32, TestFunction()); 00027 log("Temp is min(32, 666): "$Temp); 00028 textstring = "wookie"; 00029 log("3 is a "$Left(textstring, 3)); 00030 otherstring = "skywalker"; 00031 otherstring = Mid( otherstring, InStr( otherstring, "a" ) ); 00032 log("otherstring:" @ otherstring); 00033 } 00034 00035 defaultproperties 00036 { 00037 HelpCmd="Simple" 00038 HelpOneLiner="Simple" 00039 HelpUsage="Simple" 00040 }