No, it is not necessary. Empty main() will be created by script compiler if it was not defined explicitly.
Best regards,
Victor
Best regards,
Victor
We really need your input in this questionnaire
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: lindeamon on December 25, 2011, 01:37:19 PM
when will the java console include all the old features of the native console ?
/* function 1 */
sub f1(p)
{
println "f1 called with parameter " . p;
}
/* function 2 */
sub f2(p)
{
println "f2 called with parameter " . p;
}
use MyScript; /* load script from library by it's name */
f1(1); /* call function f1 */
f2(2); /* call function f2 */
f1 called with parameter 1
f2 called with parameter 2
Quote from: dogz on December 27, 2011, 06:26:03 AM
I would like to know the problem is due to the web service stop or the web service is started but can't response (maybe Apache daemon is dead) or due to the programming failure or the web page is changed by crackers and so on.
sub main()
{
f(1, 2);
f(3, 4);
}
sub f(p1, p2)
{
println "parameter 1 is " . p1;
println "parameter 2 is " . p2;
}
convert(p)
{
// do conversion here
return converted_value;
}
use convert;
return convert($event->parameters[1]);
use convert;
return convert($event->parameters[2]);
switch($event->parameters[2])
{
case 1: return "test";
case 2: return "test2";
// and so on...
}
return "unknown"; // default value