• call "proc" with condition

    From Alex AJF@21:1/5 to All on Thu Nov 3 12:35:08 2022
    Hi,
    anyone knows if we can call or execute a procedure with a condition?
    i have tried this exemple, but doesn't work :

    global var
    set var 1
    if {$var == "1"} {
    proc addRec { } {
    .......
    .......
    }

    thanks,

    Alex.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gerald Lester@21:1/5 to Alex AJF on Thu Nov 3 14:40:17 2022
    On 11/3/22 14:35, Alex AJF wrote:
    Hi,
    anyone knows if we can call or execute a procedure with a condition?
    i have tried this exemple, but doesn't work :

    global var
    set var 1
    if {$var == "1"} {
    proc addRec { } {
    .......
    .......
    }

    thanks,

    Alex.

    Honestly, I have no idea what you are asking.

    Can you write a small but complete program showing what is not working
    and describe what you want to happen.


    --
    +----------------------------------------------------------------------+
    | Gerald W. Lester, President, KNG Consulting LLC |
    | Email: [email protected] | +----------------------------------------------------------------------+

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Manfred Stelzhammer@21:1/5 to All on Thu Nov 3 21:36:16 2022
    global var
    set var 1

    proc addRec { } {
    .......
    .......
    }

    if {$var == "1"} {
    addRec
    }


    regards
    Manfred

    Am 03.11.22 um 20:35 schrieb Alex AJF:
    global var
    set var 1
    if {$var == "1"} {
    proc addRec { } {
    .......
    .......
    }

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)