Results 1 to 4 of 4

Thread: Can you......?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    Cecilton, MD USA
    Posts
    278

    Can you......?

    Is it at all possible to have your program write code within itself for you. As if you wanted it to change the actual code........but it will only happen if you ran it.

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    Cecilton, MD USA
    Posts
    278
    or something like.......read a piece of code from a text file or what have you and use that code.

  3. #3
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    yes. It can get complex though. the .NET framework provides on the fly compiling classes. Best option I can give is look through the source of SharpDevelop www.icsharpcode.net and look for how they compile.(Although it is written in C#)
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  4. #4
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Reading, UK
    Posts
    870
    you could write your own language and then parse it.

    e.g. put in the text file.

    print label2("hello")

    then you'd have to find out what print meant(change the text property of the referenced control), find the control label 2, and have some code that changes its text property. Loads of IF and select case statements would do it!

    why do you want to do that anyway?
    www.vb-tech.com
    .Net Freelance Development
    http://weblog.vb-tech.com/nick
    My blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width