Thread: Is it possible to call a function during execution?

  1. #1
    Registered User
    Join Date
    Oct 2012

    Is it possible to call a function during execution?

    I want to write a function and be able to call it during execution (say during a while(1) loop). Is this possible without having to parse an input string to extract the function and parameters I need or is that the only way?


  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    No, C does not have it's own built-in 'eval' function, where you can type in arbitrary bits of code which is then compiled and run.

    I suppose you could integrate this into your program, if you want some scripting ability.
    Lua: about
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Function execution time
    By DeanWinchester in forum C Programming
    Replies: 5
    Last Post: 01-08-2012, 02:26 PM
  2. Function execution question
    By raczzoli in forum C Programming
    Replies: 4
    Last Post: 07-02-2011, 04:36 PM
  3. Scheduling a program/function execution?
    By Aedile in forum Linux Programming
    Replies: 1
    Last Post: 08-12-2005, 10:19 AM
  4. dynamic function execution
    By Sargnagel in forum C Programming
    Replies: 7
    Last Post: 05-07-2003, 05:28 AM
  5. randomizing order of execution of function
    By y2jasontario in forum C Programming
    Replies: 2
    Last Post: 04-03-2002, 07:50 PM