Eval

Eval

Eval ist eine besondere Programmierungsfunktion zur Metaprogrammierung, mit der ein Interpreter (oder das Paar Compiler/Laufzeitsystem) angewiesen wird, ein in der Programmiersprache selbst geschriebenes Codefragment, das als Datenobjekt vorliegt, auszuwerten und das Ergebnis der Berechnung zurückzuliefern.

Da auch etwaige Nebeneffekte wie die Bindung eines Wertes an einen Namen berücksichtigt werden, wird durch Eval die Programmiersprache selbst „programmierbar“. Die erste Programmiersprache mit dieser Funktion war LISP. Da der Programmcode durch unbedarfte Nutzung von Eval schwer zu durchschauen sein kann, greifen viele Programmierer je nach Anwendungsfall lieber auf spezifischere Mechanismen wie Makros oder Closures zurück.

Eval ist unter anderem in den Programmiersprachen Perl, Bash, PHP, Javascript und Python vorhanden.

Weblinks


Wikimedia Foundation.

Игры ⚽ Нужно сделать НИР?

Schlagen Sie auch in anderen Wörterbüchern nach:

  • Eval — Saltar a navegación, búsqueda Eval en varios lenguajes de programación, es una función que evalúa el contenido pasado como parámetro como si fuera una expresión. Funciones como eval son más comunes en lenguajes de programación interpretados que… …   Wikipedia Español

  • Eval — est une fonction utilisée en programmation. Elle est présente dans de nombreux langages interprétés et permet d exécuter une commande à partir d une chaîne de caractères (ou String) générée par le programme lui même en cours d exécution.… …   Wikipédia en Français

  • eval — eval·u·ate; eval·u·a·tion; eval·u·a·tive; eval·u·a·tor; …   English syllables

  • Eval — E val ([=e] val), a. [L. aevum lifetime, age, eternity.] Relating to time or duration. [Obs.] [1913 Webster] …   The Collaborative International Dictionary of English

  • Eval — In some programming languages, eval is a function which eval uates a string as though it were an expression and returns a result; in others, it executes multiple lines of code as though they had been included instead of the line including the… …   Wikipedia

  • Eval Apartments — (Саранда,Албания) Категория отеля: 4 звездочный отель Адрес: Rr. Turizem Kanali i Çu …   Каталог отелей

  • eval — abbreviation evaluation …   New Collegiate Dictionary

  • EVAL — Evaluation (Governmental » Military) * Poly(Ethylene Vinyl Alcohol) (Miscellaneous » Plastics) …   Abbreviations dictionary

  • eval — evaluate, evaluated, evaluation …   Medical dictionary

  • EVAL — Evaluate/Evaluation NASA …   Acronyms

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”