Execute a Command Given As String

Share:

Description

Execute a piece of code.

Usage

1
Exec(x)

Arguments

x

the code to be executed

Details

This is just a wrapper to eval and parse, but easier to remember...

Author(s)

Andri Signorell <andri@signorell.net>

See Also

eval, parse

Examples

1
2
3
4
5
A <- "This"
B <- "is"
C <- "a text"
for(s in LETTERS[1:3])
  Exec(gettextf("print(%s)", s))

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.