global name references

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf global name references

  • Creator
    Topic
  • #53516
    Gary Atkinson
    Participant

    Does anyone know of where I can find documentation on all the available globals that come with Cloverleaf?  For example, I know I can use HciConnName to get the thread name, but I can not find this in the documentation.

Viewing 3 reply threads
  • Author
    Replies
    • #77958
      David Barr
      Participant

      I don’t see anything in the manual. You can use the “info globals” TCL command to see what’s available. You could put something like this in the start section of a TPS proc and then check the log:

      Code:

      echo [lsearch -inline -all [info globals] Hci*]

    • #77959
      Russ Ross
      Participant

      Here is a TCL standalone proc I picked up from Charlie Brusell that shows darn near everything when run from the command prompt within an AIX xterm in my case.

      Code:

      #!/usr/bin/ksh
      # this line to escape the next line from the tcl interpreter
      exec hcitcl “$0” “$@”

      #——————————————————————————–
      # Purpose:
      #
      #    list out the value of all the globals
      #
      # History:
      #
      # 2008.12.29 Russ Ross
      #           – downloaded orignal copy of script posted by Charlie Brusell at URL
      #
      #                 http://clovertech.infor.com/viewtopic.php?t=3256
      #
      #——————————————————————————–

      foreach glob [info globals] {
        global $glob

        # Is it an array?
        if {[array exists $glob]} {
            echo nThe values of global array $glob are:
            parray $glob
            continue
        }

        # It is not an array, make sure it exists
        if {[info exists $glob]} {
            echo nThe value of global variable $glob is: [set $glob]
        } else {
            echo nThe value of global variable $glob is: UNDEFINED
        }
      }

      Russ Ross
      RussRoss318@gmail.com

    • #77960
      Bob Richardson
      Participant

      Russ,

      Simpler way to get hcitcl “execute” detail in top line:

      #!/usr/bin/env tcl   <– space between env and tcl

      Can be used for perl and ksh too.

      (A Forum post from last year sometime).

      Simpler.

      Give it a whirl.

      Enjoy.

    • #77961
      Russ Ross
      Participant

      Thanks for the tip.

      We currently use the method you mentioned, but this script hasn’t been retrofitted yet.

      We are in the beginning of our cloverleaf 6.0 upgrade and have as one of our steps to standardized on what you showed for both our stand alone TCL and perl scripts.

      However I was planning to specify hcitcl instead of tcl like such

      #!/usr/bin/env hcitcl

      I’m curious if you think it makes much difference between referencing tcl or hcitcl.

      I just felt more comfortable using hcitcl since that is what I alwasy type at the interactive command prompt.

      Russ Ross
      RussRoss318@gmail.com

Viewing 3 reply threads
  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
5,119
Forums
28
Topics
9,293
Replies
34,435
Topic Tags
286
Empty Topic Tags
10