pragma

Discussion in 'AutoCAD' started by cesi2d, Apr 19, 2004.

  1. cesi2d

    cesi2d Guest

    Hello all

    Can everyone explain to me the PRAGMA instruction
    (this instruction is for doing what ? how ? ...)

    I don't find it on the autodesk documentation

    Thanks



    Luc Vallot
    Chemin du Bassard
    38121 Chonas l ' amballan
    France


    Tel: 04 74 58 95 68
     
    cesi2d, Apr 19, 2004
    #1
  2. cesi2d

    Barr Guest

    You talkin bout 'progn'?
     
    Barr, Apr 20, 2004
    #2
  3. cesi2d

    Doug Broad Guest

    I believe pragma is termed a compiler directive.
    It can be a help in writing programs in vlide
    because user functions protected by pragma
    turn blue. Vlide also warns when assignments
    are made to such protected symbols.

    When debugging code, however, it can be
    tricky to reload pragma-protected symbols.
    You need to unprotect the symbols
    to be re-defined at the top of the file and
    protect them at the bottom of the file.

    To protect the symbols test and this
    (pragma '((protect-assign test this)))

    To unprotect the symbols test and this
    (pragma '((unprotect-assign test this)))

    There is no need to use pragma-xxx
    statements IMO. I played around with them
    for a while before deciding that they were
    mostly a waste of time.

    These functions are only necessary for someone
    who is either bold enough or foolish enough
    to redefine the built-in functions.

    Regards,
    Doug
     
    Doug Broad, Apr 20, 2004
    #3
  4. cesi2d

    Jesse Danes Guest

    (pragma) clauses are carried over from Vital LISP when it was
    distributed by Basis Software and subsequently purchased by Autodesk and
    labelled Visual LISP. They are no longer documented or supported but
    still function.

    Basically they are pre-compiler directives and can include a number of
    compile modes and options. As suggested, protected symbols as well as
    'link and 'not-link options which can improve the speed and efficiency
    of large applications, 'drop and 'not-drop options to strip out function
    names from resulting FAS/VLX files for increased security. Pragma's are
    basically the coded version of the options available in the Project Make
    file available from the Make Application menu in teh VLIDE.

    Using these options can be tricky and must be done carefull, improper
    placement or use can cause programs to run incorrectly or certain
    elements not to function at all. For most purposes, the standard
    compile mode can be used without these options.

    Regards,

    Jesse Danes
     
    Jesse Danes, Apr 20, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
Loading...