Skip to content
Tcl Source Code History Of Ticket 1011429
Login

History Of Ticket 1011429

Artifacts Associated With Ticket 1011429

  1. Ticket change [04ce046a2f] (rid 88936) by dkf on 2004-08-18 13:23:19:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      It'd be great if we could have variables associated
      with a procedure (specifically with a Proc structure
      instance) since that would make it much easier to do
      things like accumulator functions, unique id
      generators, etc.
      
      Further ideas on syntax:
        proc cmdName {formalArgs} {persistentVars} body
      The syntax of persistentVars would be a list like
      formalArgs.  If a default is present for a pv, set the
      pv to that value when the procedure is created. 
      Otherwise the pv is initially non-existant.  No special
      handling of 'args', of course.  All pvs to be
      automatically present in the local var env when
      executing the body, just like formals.  PVs are not
      (necessarily) modified when the procedure exits.  PVs
      are deleted when the proc is deleted.
      
      Probably also need [info] subcommand for introspection
      on PVs.  :^)
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "dkf"
    9. subsystem initialized to: "22. [proc] and [uplevel]"
    10. title initialized to: "Procedure-bound persistent vars"
    11. type initialized to: "RFE"
  2. Ticket change [6de74c252d] (rid 128784) by dkf on 2004-08-18 20:24:58:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      Note: This FRQ submitted so I don't forget it.  It follows
      on from a discussion on the chat (16 Aug 2004)
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  3. Ticket change [1f35ffc44a] (rid 91108) by hobbs on 2004-08-18 23:48:29:

    1. icomment:
      Logged In: YES 
      user_id=72656
      
      This could easily be done with a 'static' command
      implemented in Tcl (likely already been done).  Use of [info
      level] [upvar] and [uplevel] has all the magic you need.
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. username: "hobbs"
  4. Ticket change [da3ff04353] (rid 147954) by dkf on 2016-07-12 19:24:27:

    1. closedate changed to: "2457582.30865159"
    2. closer changed to: "dkf"
    3. comment changed to:
      It'd be great if we could have variables associated
      with a procedure (specifically with a Proc structure
      instance) since that would make it much easier to do
      things like accumulator functions, unique id
      generators, etc.
      
      Further ideas on syntax:
        proc cmdName {formalArgs} {persistentVars} body
      The syntax of persistentVars would be a list like
      formalArgs.  If a default is present for a pv, set the
      pv to that value when the procedure is created. 
      Otherwise the pv is initially non-existant.  No special
      handling of 'args', of course.  All pvs to be
      automatically present in the local var env when
      executing the body, just like formals.  PVs are not
      (necessarily) modified when the procedure exits.  PVs
      are deleted when the proc is deleted.
      
      Probably also need [info] subcommand for introspection
      on PVs.  :^)
      
    4. icomment:
      Coroutines give us the capability to do the effects from this.
      
    5. login: "dkf"
    6. mimetype: "text/x-fossil-wiki"
    7. resolution changed to: "Out of Date"
    8. severity changed to: "Minor"
    9. status changed to: "Closed"