General HydroStatics
Ship Stability Software
Command of the Week
(New or interesting aspects of GHS that you may not know about)

SET-free variable assignments
(Requires GHS version 17.34 or later)

Ever get tired of typing curly brackets? These paired brace chars "{" and "}" have always been needed to retrieve the value of variables in GHS. So if you wanted to SET variable A equal to the sum of variables B and C, you'd have to wrap braces around both B and C to get their values:

SET A = {B} PLUS {C}

Things got better in version 17.30, which introduced symbolic expressions inside braces (as seen in COW185). This means you only need one pair of braces per expression, instead of needing braces around every variable:

SET A = {B + C}

But now in the latest GHS, you don't need any braces at all to make this assignment:

A := B + C

In fact, you don't even need the SET command! Any assignment of the form:

SET variable = "{expression}"

...can be abbreviated to:

variable := expression

Using the ":=" assignment mark, GHS has been SET free!

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