Subroutines

WhizBase version 6 added support for subroutines. Subroutines are code snippets written inside <!--WB_BeginSub_subname--> and <!--WB_EndSub--> where subname is the name that will be used for calling the subroutine using $WBSUB function and it must be unique in the scope of the main wbsp file and all sub reports and include files called from main wbsp file.

e.g.

<!--WB_BeginSub_diskarea-->
$wbformat[$wbcalc[$wbgetv[r]^2*3.1415926535897932384626433832795]|#.000]
<!--WB_EndSub-->

Multiline Subroutines are supported in the body of the reports and sub reports (below <!--WB_BeginTemplate-->) and anywhere in included files ($WBINC and $WBRINC ).
Please do not place subroutines in the configuration section(s) because it will have no effects.