Multi-language programs?

This is a discussion on Multi-language programs? within the C++ Programming forums, part of the General Programming Boards category; Is it possible to make a program that runs off of more than one language?...

  1. #1
    C++ and openGL Raeliean's Avatar
    Join Date
    Jul 2005
    Posts
    28

    Multi-language programs?

    Is it possible to make a program that runs off of more than one language?
    Be inspired.

  2. #2
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    Yes. The .NET framework can do it. I'm afraid I only know how to do it using Visual Studio.NET - I'm not sure how you could do this using the SDK. You create one project for each language you intend to use. Put the components for your program from each language in the appropriate project, then add references in each project to all the other projects. If you're not using the .NET framework, I know of no such possibility.

  3. #3
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    You can write inline assembler in C or C++ or pascal. You can write DLL's in most languages and call them from a c/c++ app. The DLL gets loaded into your programs address space and can be part of the same solution if that counts.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  4. #4
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    You can write a program that parses the source code for other languages and either inteprets it or uses just in time compiling to run it. ...

    Hey, you asked if it was possible. You said nothing about easy.
    Away.

  5. #5
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    going along in that thread, you might even be tempted to make your own language, and have something to parse that into any other language, then send that to it's own compiler/interpreter/whatever...
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  6. #6
    *this
    Join Date
    Mar 2005
    Posts
    498
    now that is cool how would you do something like that?

  7. #7
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    with alot of work and in-depth knowledge of all the languages you're going to be using.
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  8. #8
    C++ and openGL Raeliean's Avatar
    Join Date
    Jul 2005
    Posts
    28
    What would you use to write a language?
    Be inspired.

  9. #9
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    your brain. and probably a computer.
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  10. #10
    C++ and openGL Raeliean's Avatar
    Join Date
    Jul 2005
    Posts
    28
    But how would it work.. the way I see it is you need a language to make a program.. so what makes a language?
    Be inspired.

  11. #11
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    people make languages.

    at this point, I highly doubt you'd be ready to create your own language... at least not from scratch... for, example, one could make a language like this:
    Code:
    bringIn :iostream:
    
    typeInteger mainFunction()
    {
        consoleOut("Hello World");
        sendBack(0);
    }
    then have a program translates that into C++ and compile the C++, or to have a true language, you'd compile that directly into a binary (if that's the route you take with your language... i.e. not interpreted)

    the easiest way to "create your own language" is to map all the keywords in one language to keywords in another language... you wouldn't really be creating a new language, but unless you know how to create a compiler, you won't be able to build a language from the ground up.
    Last edited by major_small; 07-09-2005 at 07:11 PM.
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  12. #12
    C++ and openGL Raeliean's Avatar
    Join Date
    Jul 2005
    Posts
    28
    I know, I have no interest in my own language I was just curious what it took to create one.
    Be inspired.

  13. #13
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    basically, to truly create your own language, you need to be able to create a compiler.

    you need to know how to translate human-readable text into a series of 1's and 0's that the computer can read... or at the very least assembly...
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  14. #14
    *this
    Join Date
    Mar 2005
    Posts
    498
    then wouldnt you have to differentiate between little endian and big endian systems? $#@! that would be so hard...

  15. #15
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    you'd have to take the whole platform into consideration: AMD or Intel? 32 or 64? windows or linux? etc. etc. etc.
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. The value of learning a new programming language
    By h3ro in forum General Discussions
    Replies: 21
    Last Post: 06-13-2009, 02:48 AM
  2. ASM to C language
    By TAZIN in forum C Programming
    Replies: 22
    Last Post: 06-03-2009, 07:29 AM
  3. assembly language...the best tool for game programming?
    By silk.odyssey in forum Game Programming
    Replies: 50
    Last Post: 06-22-2004, 02:11 PM
  4. Language of choice after C++
    By gandalf_bar in forum A Brief History of Cprogramming.com
    Replies: 47
    Last Post: 06-15-2004, 02:20 AM
  5. Enough language discussions.
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 06-13-2004, 10:59 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21