A Sample Hullstat Template

This illustrates, by example, how Hullstat achieves its aim with total flexibility. The '#' lines form a simple interpreter language, communicating with Hullform. The other lines combine plain text and "substitution fields" which enter values into the output file.

The result is a text-format output file. RTF templates generate RTF output, including formatted tables and full-featured graphics.


Tank Statics Summary for Design "`hull`"

#runsummary
#set heel=0
#put heel
#get masun
#get lenun
#set m="`masun`"
#set l="`lenun`"
#perform balance
#set pitch=0
#put pitch
#set i=0
#get tankct
#dim tankds[tankct]
#dim tankwl[tankct]
#dim tankfr[tankct]
#dim tankvl[tankct]
#dim tankms[tankct]
#dim tankvg[tankct]
#dim tanklg[tankct]
#dim tankmo[tankct]
#dim tankfm[tankct]
#foreach tank
	#set i=i+1
	#get tankds[i]

Tank Number `%0 i`: `tankds[i]`

Percent	Snding	Vol.	Weight	VCG	LCG	TCG	FSM	Ullage
Full	`l`	cu.`l`	`m`	`l`	`l`	`l`	`m` `l`	`lenun`
-------+-------+-------+-------+-------+-------+-------+-------+-------+
	#set tankfr[i]=0.00001
	#print tankds[i]
	#put tankfr[i]
	#perform evaluate
	#get tankwl[i]
	#set wle=tankwl[i]
	#set tankfr[i]=100
	#put tankfr[i]
	#perform evaluate
	#get tankwl[i]
	#set wlf=tankwl[i]
	#set frac = 5
	#loopwhile frac < 101
		#set tankfr[i]=frac
		#put tankfr[i]
		#perform evaluate
		#decimal 0
		#print frac
		#get tankwl[i]
		#get tankvl[i]
		#get tankms[i]
		#get tankvg[i]
		#get tanklg[i]
		#get tankmo[i]
		#get tankfm[i]
		#set vol=tankvl[i]*frac*0.01
		#if tanklg[i] < 0
			#set tanklg[i] = " "
		#endif
		#if tankvg[i] > 900
			#set tankvg[i] = " "
		#endif
`%0 frac`	`%3 tankwl[i]-wle`	`vol`	`tankms[i]`	`tankvg[i]`	`tanklg[i]`	`tankmo[i]/tankms[i]`	`tankfm[i]`	`wlf-tankwl[i]`
		#set frac=frac+5
	#endwhile
#next tank