General HydroStatics
Ship Stability Software |
Command of the Week
(New or interesting aspects of GHS that you may not know about) |
ROUTINE
(Requires GHS version 18.50 or later) |
New in GHS 18.50, the ROUTINE command is a major addition to the command language. ROUTINE is like SUBROUTINE, FUNCTION, and PROCEDURE in other
languages.
GHS/BHS users with current maintenance/support will be receiving version 18.50 starting next week. Advantages to using the ROUTINE structure include:
|
ROUTINE WindReport (AxisRange; AxisIncrement; HeelRange; HeelIncrement) VARIABLE h=0, a=0 VARIABLE (STR) plotlabel, plotline MACRO plotline plotline:="{plotline},%1" / MACRO plotlabel plotlabel:=""{plotlabel}",""heel=%1""" / plotlabel:="Axis" .plotlabel (HeelRange/HeelIncrement+1,HeelIncrement) 0 ME PLOTSTART "Rig Heeling Moments" /POLAR ME PLOTLABEL {plotlabel} LOOP HEEL 0 AXIS {a} h:=0 plotline:="{a}" LOOP HEEL {h} TRIM 0 SOLVE DEPTH .plotline {.HMMT} h:=h+HeelIncrement IF h>HeelRange THEN EXIT END END ME {plotline} a:=a+AxisIncrement IF a>AxisRange THEN EXIT END END ME PLOTEND END WindReport WindReport(360,15, 90,15) |
Questions, comments, or requests?
Contact Creative Systems, Inc. USA phone: 360-385-6212 Fax: 360-385-6213 Office hours: 7:00 am - 4:00 pm Pacific Time, Monday - Friday Mailing address: PO Box 1910 Port Townsend, WA 98368 USA Click here for an index to this and previous COWs |