GHS Port Reference Center
Information for maritime designers, engineers and builders
Maintained by Creative Systems, Inc., Creators of GHS
Click here for information about GHS and other fine marine software.
Go to Main page

Using a loop to report all submerged critical points.
    `Looping through Critical points 1-5 using system variable FLDHT to report
    ` the height of the each active floodpoint if it is submerged. Undefined
    ` critical points are ignored
    
    read fv.gf
    
    draft 5
    vcg 5.25
    so we,lcg
    
    crtpt(2) "test1" 33a,0,4.75
    crtpt(3) "test2" 33a,0,5.5
    crtpt(4) "test3" 33a,0,5.25
    crtpt(5) "test4" 33a,0,4.0
    
    Variable (real) crtht:1:5=1
    
    macro lowcrtpt
       macro incrt
        set crtht = {crtht} plus 1
      //
       macro crtrep
        \{2}Critical Point {1}{crtht}  {2}- height is {4}{fldht}\
       //
    fldpt OFF
    set error = -4
    set crtht = %1
    fldpt ({crtht}) ON
    if {fldht} = "" then exit
    if {fldht} < 0 then .crtrep
    .incrt        `Incrementing through Crtpt's
    fldpt (*) ON
    set error = -1
    /
    
    .lowcrtpt(5,1)1
    

Add a free link to your site
Copyright © , Creative Systems, Inc.