• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. How can i define global variables? About Skill Lint Warning...

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 143
  • Views 7313
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How can i define global variables? About Skill Lint Warning message.

jjoon2
jjoon2 over 2 years ago

Hi, I have some question about global variables.

I'm making a script to test appForm(Standard Form). 

When I run SKILL Lint to the script, I can find general warning message. The message and code are as follows.

(Script may have some omissions for readability.)

=============================================================

   WARNING GLOBAL

      - (VAR5) Unrecognized global varibales:

         - (VAR8) AppForm_namee

            - used: in-functino testMakingForm lines(97)  

=============================================================

procedure(testOptionFormRun()

   let(( frameField_Variable)

      frameField_Variable = hiCreateFrameField(

         ?name 'frameField_name

         ?labelText "frameField_labelText"

      )  ; hiCreateFrame~

      hiCreateAppForm(

         ?name 'AppForm_namee

         ?formTitle "appFormTitle"

         ?fields list( list(frameField_Variable 10:10 350:500 100))

      ); hiCreateApp~

   ); let

); procedure

procedure( testMakingForm()
   prog( ()

      hiDisplayForm(AppForm_namee)   -----> 97 line
   );prog
);procedure

=============================================================

I understand that variables that are not declared as regional variables in 'let' and 'prog' are automatically declared as global variables.

And I understande that AppForm_namee is declared to global variable by 'hiCreateAppForm'.

So, I don't know why  that warning message pops up.

Is there another way to declare global variables?

How can i delete the warning message. please tell me about that. 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago

    You don't declare global variables in the code itself (variables are global unless you declare them in a let/letseq/letrec/prog/function argument etc). However, you can tell SKILL Lint about them:

    You press the options button on the form, and then you can enter any global variable names as you've done here. The other approach you could take is to use a prefix (ideally something unique - "App" is not terribly unique) and put that in the package prefixes. That will allow all global variables beginning with that prefix. Note that (by default) the prefix must begin with an uppercase letter (that's the "strict checking of global variables" mentioned in the log).

    The idea here is that global variables should be used sparingly (top-level user interface elements like forms and menus really have to be global, so that's a valid use of them), so if you consciously give your global variables a designated prefix they will not be flagged up by SKILL Lint, but anything where you've accidentally forgotten to put the variable in a let (assuming you don't use the prefix on the variables intended to be local) would still generate the warning in Lint.

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information