Path: utzoo!attcan!uunet!know!cs.utexas.edu!usc!ucsd!ogicse!dali.cs.montana.edu!milton!yoda.eecs.wsu.edu!rdubey From: rdubey@eecs.wsu.edu (Rakesh Dubey - grad student) Newsgroups: comp.lang.c Subject: Self-modifying code Message-ID: <1990Oct08.183922.12541@eecs.wsu.edu> Date: 8 Oct 90 18:39:22 GMT Reply-To: rdubey@eecs.wsu.edu (Rakesh Dubey - grad student) Organization: Washington State University, Pullman Lines: 26 >>> svissag@hubcap.clemson.edu >>> Re: Two Questions. About declaring the structure, it is possible but I can see no reason why you want to do that. Things like self-modifying code are simply not worth it. How would you debug/understand/prove a code that modifies itself. And you are trying a higher level programming language, would you modify the C source code statements and recompile everything. Coming back to the original point, this is the way you *can* do it. But it sure is stupid. 1. Read the name of the structure and kind of things the user wants to be in it. (Range, type, limits etc.) 2. Creat a file containing C source code which defines such a structure. 3. Now exec a Makefile which compiles your source code file and this brand new one you created just now. You will finally have a new process running. This might be called self-modifying higher level code and many extensions come to mind. But there will be bunch of problems too. Though I *think* you can do it, but you shouldn't be needing such tricky/unreliable kind of stuff. -- --- Rakesh Dubey rdubey@yoda.eecs.wsu.edu