GHS Version 18.50 Update


New features, changes, and bug fixes since version 18.00



=========== SUMMARY OF TOP NEW FEATURES =========


Condition Graphics (DISPLAY STATUS) now includes, in addition to the standard displays, rotatable surface views.

The new RENDER command brings up a window showing the vessel and the current waterplane. (This does not require the Condition Graphics module.)

Your command-language programming (Run files) will benefit greatly from the new ROUTINE command, which goes well beyond the capability of macros. Variables and macros defined within the scope of a ROUTINE are local, meaning that conflicts with outside variables and macros are avoided. ROUTINE provides true parameter passing, loops, and block-structured conditionals.


=========== MAJOR NEW FEATURES =========


New Condition Graphics (CG) Interactive 3D Profile and Plan Features


DISPLAY STATUS /3D[:WIRE] parameter was added to render any PROFILE or PLAN views as surfaced three-dimensional graphics, which may be rotated, zoomed, or panned using the mouse (right-click and drag for rotate, scroll wheel for zoom, and center-click and drag for pan) or keyboard (ALT+arrow keys for rotate, -/+ keys for zoom, and arrow keys for pan). Optional WIRE subparameter renders the vessel using lines instead of surfaces. They cannot be used with "@" locations or report output.

DISPLAY STATUS PROFILE|PLAN:3D|WIRE|2D subparameters override any /3D[:WIRE] parameter for a particular view.


New RENDER Command Features


RENDER [(partlist)] command was added to render an interactive visualization of the listed parts (or entire vessel geometry if omitted), respecting any sail transformations specified by the TYPE command and showing the current vessel waterplane unless the /NOWPL parameter is present.

ENTER PM command RENDER added ;SPAWN parameter to continue while the rendered geometry appears in a persistent separate window.

SE and DISPLAY command Visualize added SPAWN parameter to continue while rendering geometry in a persistent separate window.


New ROUTINE Command Programming Feature


ROUTINE name ([[VAR] parameter];...) defines a programming routine with a parenthesized list of semicolon-separated parameter variable names. Each parameter declares a routine-local variable that is assigned the corresponding value from the parameter list when the routine is called. If preceded by the keyword VAR, the parameter refers to a variable (not a value) passed by the caller, so that any value assigned by the routine to that parameter is passed back to the caller's variable when the routine returns.

The routine definition ends when a line comprised of END then the routine name is reached. A routine may begin defining local VARIABLEs, MACROs, TEMPLATEs, and sub-ROUTINEs; these are available only while the routine is running, disappearing when it returns. Once these initial definitions are done and other commands are issued, no further routine definitions are allowed aside from local VARIABLEs.

A routine may be called directly using its name followed by a parenthesized comma-separated list of parameters. Even if a routine has no parameters, calling it still requires empty parentheses. A routine may assign a value to its name that will be returned to its caller. This value can then be assigned to a variable when the routine is called using variarble:=name(parameter,...) or returned anywhere in a braced expression like {name(parameter,...)}.

All names appearing in a routine refer to local variables, macros, templates, and subroutines declared within the routine, unless prefaced by a period "." to refer to global names (such as system variables). Module names can be accessed by prefacing with "^." and names declared in any calling routine can be accessed by prefacing with "^".

IF statements operate differently within routines, using a multi-line block separated by ELSIF and ELSE lines and terminated by an END line instead of being all contained in a single line, using the following syntax:

  IF condition THEN
    command lines to do when IF condition is true
[ ELSIF condition THEN
    command lines to do when ELSIF condition is first to be true ]...
[ ELSE
    command lines to do when no IF or ELSIF condition is true ]
  END

Note that ELSIF and ELSE sections are optional, and multiple ELSIF sections can appear in the same IF block. IF blocks can be nested to any level. Conditions like operand1=operand2 use numeric instead of character-by-character comparison unless at least one operand is surrounded by quotes. Unquoted operands are automatically evaluated as expressions as if enclosed by braces.

LOOP blocks are provided within routines to skip back to the top of the LOOP when its matching END line is reached, only exiting the LOOP when an EXIT line is encountered. Note LOOP and IF blocks can be nested together to any level, so an EXIT line gets out of the innermost active LOOP block, skipping through any intervening IF blocks, or exiting the routine if no LOOP is active.


New TANKS Selection Features


TANKS /IN, /OUT, /BOTTOM, and /TOP parameters accept arbitrary location-based functions instead of just a constant value (e.g. /BOT:15@50a,5@20A,5@20f,15@50f to select tanks intersecting above a varying floor).

TANKS /IN:offset,complist and /OUT:offset,complist were added to exclude tanks based on the offsetted port or starboard side of listed components at their intersection with the current waterplane (not including any wave), given a transverse inward offset including "p" or "s" suffix indicating port or starboard side, and a complist consisting of one or more part[\component] specifications respecting * wildcard (e.g. /IN: 2.5s, HULL\HULL.C to exclude tanks entirely 2.5 inboard of HULL\HULL.C's starboard waterline).


New Maximum VCG (MAXVCG) Features


MAXVCG no longer limits the number of trim angles or LCG values to 10 maximum.

MAXVCG and SOLVE MAXVCG now ROLLs back opposite from the ANGLES direction when /FIXDIR is present or the current HEEL is zero.

MAXVCG exit tolerance was modified to reduce chance of results having slightly negative limit margins.


New NEXT String Searching Features


SET operator NEXT n was added to return the position (0 if none) of any character from the next string found in the second string if n=0, or the first case-sensitive match of the next string found starting at position n in the second string if n>0, or the first case-insensitive match of the next string starting at position -n in the second string if n<0. NEXT can also appear as a function in braced expressions; thus ME {NEXT(N,"AB","ABCabcABC")} displays 7 if N=3, 4 if N=-3, or 1 if N=0.


New Advanced Features (AF)


DAMSTAB /SDI421PSP method was added by appending "SP" after /SDI421P to indicate a special purpose ship (similar to /SDI194CSP, etc.).

DAMSTAB /DIVLENGTH parameter replaced /EXPERIMENTAL (though the former parameter name still works for backward compatibility), still causing inner compartments to be examined only with the division length when deciding whether the bottom is low enough to be flooded, but no longer putting "EXPERIMENTAL" into the report title.EXTEND HOPPER improved its heel solving.

EXTEND HOPPER improved its heel solving.


New Load Editor (LE, LEw) Features


LOAD EDIT /SAFEFILL:maxsafe now works with tanks listed in SAFEFILLTANKS user variable if it has been defined, overriding default usage with petroleum tanks having varying density dependent on temperature.


New SeaKeeping (SEA) Features


SEA now imposes limits on inertial forcing amplitudes when computing responses for small encounter frequencies; while not strictly necessary, this limit is consistent with those already imposed on the forward speed corrections for the added mass and damping coefficients.


New Tank Soundings (TS) and Characteristics (TC) Features


TS /Format:7 was added to include columns for Volume, Cu.Ft/M., Weight, Center, and Transverse Moment vs Sounding per Norwegian Maritime Authority preference.

TS /CAP:f1[,f2[,f3]] shows the capacity for up to three load fractions in each table header. A negative fraction f can be specified to show -f capacity only for tanks having specific gravity less than 1 (i.e. those with contents lighter than Fresh Water). Using /CAP:0 omits capacity information from table headers. The default TS behavior is /CAP:100%,-95% when /CAP is not present.

TS /VDEC:places parameter was added to specify the number of decimal places to use when displaying volume values.

TC /CM parameter was added to format soundings and reference heights in centimeters instead of millimeters when in metric unit mode.


New Keyboard Access to Split-Screen Display Area Features


Command-line editing from the main program added the Alt-E key combination. Whereas Ctrl-E picks the previous command and the Up-Arrow key picks up the previous word whether it's a command or not, Alt-E keeps going up until it reaches a non-command word (so it can be used to get to the Display area in split-screen mode). After the first press of Alt-E or Up-Arrow, the other arrow keys can be used to select a word from various places on the screen.


New PRINT and REPORT Features


PRINT /PAPER:LETter|LEGal|LEDger|A4|A3|A2|h,w|* parameter was added to print or preview using the given paper size name or height and width in inches; note /PAPER:* restores the old behavior using paper size from system printing preferences.

PRINT filename uses paper size implied by any previous PRINT CONFIGURE /L:lines configuration setting unless overridden by the /PAPER parameter; note this also applies when previewing any .PF file opened directly from the operating system.

PRINT /PREVIEW right-click menu Print dialog Preferences Paper size is now active so it can be changed to print using the selected paper size (note all other Printing Preferences dialog info is read-only so any changes are ignored).

PRINT CONFIGURE dialog only selects the primary printer for PRINT output without affecting any printer settings, so now makes sure to disable all other dialog controls (such as Properties and Number of copies) to avoid confusion.

REPORT CLOSE and PRINT (without filename) print the current report file using paper size implied by any REPORT /L:lines parameter when the report was opened, otherwise using any previous PRINT CONFIGURE /L:lines configuration.

MESSAGE REPFONT Wrap parameter was added to left-justify NOTE output, wrapping any overflow past the page width margin to the next line instead of compressing it to fit. If a fancy REPORT /BOX:COLOR|BW report is active then the current PRINT CONFIGURE /FONT is wrapped, otherwise the default fixed font is wrapped (unlike other REPFONT modes that only work with fancy reports).

NOTE {%IMAGE("file",hpos,-1|width[,-1|height])%} places a BMP or JPG file image on the report page starting at the current line, then moves that current line down by the image height, which can be specified in inches or (if missing) taken from any vertical height encoded in the image file; aspect ratio is preserved when -1 is given in place of width and/or height, even when these are automatically reduced to avoid truncation past the edge of the page.

NOTE commands no longer restrict {expression} evaluation except for literal color number codes (e.g. {4}) and style markers ({+b}, {+d}, {+i}, and {+u}) appearing at the top level (not resulting from nested {expression} evaluation).


New Improved MESSAGE and ERROR Reporting Features


MESSAGE output of overlong text to the screen now wraps to the next line at space boundaries when possible, instead of the extreme edge of the window.

ERROR output of overlong error messages now wraps to the next line instead of being truncated.

ENTER PM error messages no longer truncate the command causing the error after 77 characters, instead showing up to 1024 command characters on multiple lines.


New Dialog Box (TEMPLATE) and MACRO Features


TEMPLATE field EXPAND now works with SET-free assignments variable := expression in the same way that SET, VARIABLE, and IF commands are executed.

LIST /PRINT parameter was added to list macros and templates to the current output file instead of to the screen.

LIST output of overlong command lines now wraps to the next line instead of being truncated.


New System Variables and Other VARIABLE Features


RAANGDIR system variable was added to return 1 if the RA command angle list is starboard-directed or -1 if port-directed. This is primarily useful within a macro specified by the /RAMACRO parameter, but can also be used outside the RA, MAXVCG, and SOLVE MAXVCG commands to get the ANGLES list direction.

LOAD2 system variable now works for multiple selected tanks by returning the total actual volume divided by total maximum volume instead of undefined.

PATHHERE system variable now respects the current SPECIAL SHORTNAME setting.

SET-free variable assignment variable := number now preserves full precision in the same way as variable := "number" or SET variable = number instead of rounding to 5 decimal places (or as specified by the SPECIAL SYSDEC command).

VARIABLE {name:-d} replaces a numeric variable with a compact representation of its value rounded to d decimal places trimmed of trailing zero decimals.


======= Miscellaneous New Features =======


ADD /PED:loc,len /ACcess was added to access LS pedestal location and length.

DISPLAY (list) PRINT /ONLYINtro shows only the initial graphics and the part summary list, omitting part plots and offsets.

ENTER /ENVironment parameter was added to pass the vessel waterplane, loading, any sail transformations, etc. to the external program.

HMMT hm1 @ ang1,... and HMMT TANK added /LINEAR parameter to force linear interpolation between and beyond specified heel angles instead of default 2nd degree polynomial interpolation.

WRITE /NAME:pattern parameter now supports a comma-separated pattern list.


======= Bug Fixes =======


CC /DRAFT table was reporting drafts at origin instead of LCF whenever the DRAFT @ location was not specified (since 16.30 only).

COMP /PERM:value was not immediately updating system variables like TVOLUME.

DAMSTAB updated the method used to create lesser extent damage cases to account for progressive flooding in the division definition, correcting a tendency to remove crossflooding tanks from the final damage case (since 17.88A only).

DAMSTAB was sometimes incorrectly considering "+" prefixed tanks as flooded despite their preceding tanks not being flooded due to interference during intermediate stages of the flooding analysis.

DISPLAY and DISPLAY STATUS risked trapping a run-time error in rare cases of complex shapes with multipe lobes.

DISPLAY (*) STATUS vessel views were not excluding tanks set to PERM -0 (since 17.86 only).

DISPLAY STATUS /PAGE%:percent output that Condition Graphics detected was too large to fit on the current page was sometimes garbling subsequent text output in fancy REPORT /BOX:COLOR|BW mode.

DISPLAY STATUS PLAN@WP and similar cut views with non-zero heel were sometimes distorting components built with non-zero translation vectors.

DRAFT output now uses the PRINT /FONT (or Arial by default) in fancy reports.

DYNSTAB PL /LEVEL:2 was incorrectly computing the C2 indices when the equilibrium angle was a large port side angle.

DYNSTAB SB was not converging to a critical vessel speed when evaluating on certain resistance and torque curves.

EXTEND HOPPER was not calculating Flooding Volume correctly for empty tanks and stations not holding cargo.

ENTER PM command CREATE statement OPPOSITE was trapping an error if its optional tank parameter was missing (since 12.00 only).

ENTER PM command MODIFY statement JOIN was occasionally failing to cleanly join bulbous bow components to the hull.

ENTER PM statement JOIN was excluding instead of preserving identical stations in current and target components and other unusual cases (since 12.00 only).

ENTER PM statement ROTATE was incorrectly rotating counter-clockwise instead of clockwise for portside components.

ENTER PM statement ROTATE was incorrectly rotating the starboard reflection of portside components (since 17.92B only).

ENTER PM statement ROTATE was not consistently rotating in the order heel first, then trim, then azimuth when creating shapes from plane boxes, edges, cylinders, elbows, and spheres, but now matches rotation order for other shapes.

ENTER PM statement ROTATE was not consistently turning around any part reference point using optional pivot point height in all rotation scenarios.

ENTER PM was rounding REAL variables passed as MACRO parameters to 2 decimal places, but now preserves up to 5 decimals precision.

ENTER PM, SE, MC, and other auxiliary programs were sometimes failing to READ geometry files having a part listing a component name with side suffix omitted followed by the same component name with side suffix specified.

EQUNOW system variable was not always correctly set to 1 after pressing Ctrl-A or the Solve button in Load Editor if already nearly in solving equilibrium.

EXECUTE macro (n [,inc]) was not evaluating as braceless expressions nor trapping an error if n or inc started with a number, instead using that number and ignoring any text that followed (e.g. "60/10" was taken as 60 not 6).

FIXUP [(part\component)] was failing if the component (first in vessel if none) did not have a side designator and was not centerline.

FSMFloor "contents" = OFF was behaving the same as FSMF "contents" = FSM, instead of correctly behaving the same as FSMF "contents" = 0.

FSMFloor OFF was not always setting the separate minimum free surface moment for each different contents name to zero, instead incorrectly behaving the same as FSMF 0 | FSMF "*" = FSM. Note that the correct FSMF OFF behavior can be replicated in earlier versions using FSMF 0 | FSMF "*" = 0.

File access commands were sometimes failing for paths containing non-ASCII characters under Windows 11 only, but this operating system bug has now been worked around.

IF conditions containing multiple unquoted items on the same side of the comparison operator now trap an error instead of behaving unpredictably.

LOAD (tanklist) EDIT risked trapping a run-time error when executing a macro that reads a new Geometry File not having any tanks in tanklist.

LOAD EDIT /BUTTON was sometimes resizing incorrectly when revealing a wide button row that was initially invisible below the bottom of the window.

Load Editor risked trapping a run-time error when entering the Contents column if substances had previously been removed using the CONTENTS OFF 0 command.

Load Editor sometimes showed slight pre-Solve trim differences after changing a load value using the Enter key compared to moving to another field using a cursor key.

LOAD STATUS was occasionally trapping "bad slope" for TYPE PRESSURIZED tanks.

LS was sometimes failing to combine point weights at the same location due to tiny rounding differences.

MAXRRAH system variable was sometimes incorrectly trapping an error that it failed to find the next residual maximum arm angle.

MC file [(part\component)] FIXUP shows a warning message that fill was skipped instead of trapping an error if component (HULL\HULL.C if none) does not exist.

Menu File -> Read geometry no longer traps "Please CLEAR first" if a geometry is already present, instead clearing the current geometry before reading the new one.

MESSAGE TRACE ON|OFF commands are no longer sent to MESSAGE (REPORT) files.

NOTE {%printcommand(...)%} output of PP print commands was made more reliable.

Part Maker run from a command line or file association risked trapping an error when passed a very long run file path or one containing pairs of parentheses or square brackets.

PERM permeability was inadvertently turning off any override FLOOD permeability if the specified permeability precisely matched the part's original component permeabilities carried in the geometry file (since 9.54F only).

PP command TEXT sometimes unnecessarily reduced the font size of right-justified text when very close to the edge of the page.

PRINT CONFIGURE /FONT:font was not being remembered when the program restarts unless a footer was present.

RA /LIM for LIMIT ANGLE FROM EQU TO FLD > 0 was sometimes passing with incorrect 0 deg margin when a tight point was submerged at equilibrium but showed positive height at the previous heel angle, neglecting to insert a line for the tight point immersion heel (since 16.78B only).

RA /LIM for LIMIT RESIDUAL RATIO now shows FAIL margin if the residual righting arm at the limit's first angle is positive, indicating a zero-crossing before equilibrium that would deduct from the ratio's denominator area.

READ /APPEND risked memory errors when appending shape containing property tables or surface model data structures.

REPORT /BOX[:CLASSIC] was misformatting the box corner for column header lines containing styled text markers like {+b} for boldface.

RUN without /QUIET now shows "End of Run File" completion message in the Display area instead of any split Command area.

SE command FILL in an empty shape was sometimes trapping a run-time error; also, an empty first shape was preventing FILL entry for subsequent shapes.

SE was sometimes unresponsive after clicking the mouse in an empty shape.

SEA /ROLLTANK was sometimes yielding zero responses for certain tank geometries which were far above the baseline.

SEA was sometimes trapping a run-time error using WAVE (SPECTRA) J2 waves.

SEA was sometimes trapping a run-time error when combining /RELATIVE and /DATA parameters.

SEA was still sometimes trapping a run-time error using WAVE (SPECTRA) J2 waves (since 18.00B only).

SEA was trapping a run-time error in rare cases.

SOLVE PRIMARY:channel no longer stops any current MB interaction unless the channel name changed.

STATUS, HS, GHS, TC, etc. waterplane header with LBP or LWL defined were sometimes incorrectly showing 0.000 trim length for tiny but non-zero trim.

TEMPLATE dialog first field would sometimes blink and in rare cases be truncated when an IDLE macro was executing (since 17.12 only).

TYPE INTACT /HBL was incorrectly setting load to -1 for BUBBLE type tanks (since 10.06B only).

WRITE (LINEs), WRITE (Variables) /Append, and other file append commands were sometimes deleting the old file contents in rare cases where a network job queue had not yet completed an earlier write operation.



Previous Version Update Features


Copyright (C) 2022 Creative Systems, Inc.