Skip to main content

Tcl

foreach x [info commands] {if {$x!="rename"&&$x!="if"} {rename $x ""}}

This removes all keywords from the language except if and rename.

The above code would cause any new code to error out. So it's debatable if the new inserted code actually gets "executed". Below is a version that executes new code but does nothing because it changes all keywords (except if and renameproc) to a no-operation):

foreach x [info commands] {if {$x!="if"&&$x!="proc"} {
    proc $x args {}
}}

Instead of deleting keywords this code replaces them with a function that does nothing.

Note: (I'mNote: I'm using "keywords" very loosely here because Tcl doesn't have keywords, only functions)

Tcl

foreach x [info commands] {if {$x!="rename"&&$x!="if"} {rename $x ""}}

This removes all keywords from the language except if and rename.

The above code would cause any new code to error out. So it's debatable if the new inserted code actually gets "executed". Below is a version that executes new code but does nothing because it changes all keywords (except if and rename to a no-operation):

foreach x [info commands] {if {$x!="if"&&$x!="proc"} {
    proc $x args {}
}}

Instead of deleting keywords this code replaces them with a function that does nothing.

Note: (I'm using "keywords" very loosely here because Tcl doesn't have keywords, only functions)

Tcl

foreach x [info commands] {if {$x!="rename"&&$x!="if"} {rename $x ""}}

This removes all keywords from the language except if and rename.

The above code would cause any new code to error out. So it's debatable if the new inserted code actually gets "executed". Below is a version that executes new code but does nothing because it changes all keywords (except if and proc) to a no-operation:

foreach x [info commands] {if {$x!="if"&&$x!="proc"} {
    proc $x args {}
}}

Instead of deleting keywords this code replaces them with a function that does nothing.

(Note: I'm using "keywords" very loosely here because Tcl doesn't have keywords, only functions)

deleted 31 characters in body
Source Link
slebetman
  • 689
  • 3
  • 10

Tcl

foreach x [info commands] {if {$x!="rename"&&$x!="if"} {rename $x ""}}

This removes all keywords from the language except if and rename.

The above code would cause any new code to error out. So it's debatable if the new inserted code actually gets "executed". Below is a version that executes new code but does nothing because it changes all keywords (except if and rename to a no-operation):

foreach x [info commands] {if {$x!="rename"&&$x="if"&&$x!="if"="proc"} {
    rename $x ""
    proc $x args {}
}}

Instead of merely deleting keywords this code replaces them with a function that does nothing.

Note: (I'm using "keywords" very loosely here because Tcl doesn't have keywords, only functions)

Tcl

foreach x [info commands] {if {$x!="rename"&&$x!="if"} {rename $x ""}}

This removes all keywords from the language except if and rename.

The above code would cause any new code to error out. So it's debatable if the new inserted code actually gets "executed". Below is a version that executes new code but does nothing because it changes all keywords (except if and rename to a no-operation):

foreach x [info commands] {if {$x!="rename"&&$x!="if"} {
    rename $x ""
    proc $x args {}
}}

Instead of merely deleting keywords this code replaces them with a function that does nothing.

Note: (I'm using "keywords" very loosely here because Tcl doesn't have keywords, only functions)

Tcl

foreach x [info commands] {if {$x!="rename"&&$x!="if"} {rename $x ""}}

This removes all keywords from the language except if and rename.

The above code would cause any new code to error out. So it's debatable if the new inserted code actually gets "executed". Below is a version that executes new code but does nothing because it changes all keywords (except if and rename to a no-operation):

foreach x [info commands] {if {$x!="if"&&$x!="proc"} {
    proc $x args {}
}}

Instead of deleting keywords this code replaces them with a function that does nothing.

Note: (I'm using "keywords" very loosely here because Tcl doesn't have keywords, only functions)

added 580 characters in body
Source Link
slebetman
  • 689
  • 3
  • 10

Tcl

foreach x [info commands] {if {$x!="rename"&&$x!="if"} {rename $x ""}}

This removes all keywords from the language except if and rename.

The above code would cause any new code to error out. So it's debatable if the new inserted code actually gets "executed". Below is a version that executes new code but does nothing because it changes all keywords (except if and rename to a no-operation):

foreach x [info commands] {if {$x!="rename"&&$x!="if"} {
    rename $x ""
    proc $x args {}
}}

Instead of merely deleting keywords this code replaces them with a function that does nothing.

Note: (I'm using "keywords" very loosely here because Tcl doesn't have keywords, only functions)

Tcl

foreach x [info commands] {if {$x!="rename"&&$x!="if"} {rename $x ""}}

This removes all keywords from the language except if and rename.

Tcl

foreach x [info commands] {if {$x!="rename"&&$x!="if"} {rename $x ""}}

This removes all keywords from the language except if and rename.

The above code would cause any new code to error out. So it's debatable if the new inserted code actually gets "executed". Below is a version that executes new code but does nothing because it changes all keywords (except if and rename to a no-operation):

foreach x [info commands] {if {$x!="rename"&&$x!="if"} {
    rename $x ""
    proc $x args {}
}}

Instead of merely deleting keywords this code replaces them with a function that does nothing.

Note: (I'm using "keywords" very loosely here because Tcl doesn't have keywords, only functions)

Source Link
slebetman
  • 689
  • 3
  • 10
Loading