compilers

This is a discussion on compilers within the A Brief History of Cprogramming.com forums, part of the Community Boards category; hi im new to the board. Im a sophmore in HS and just started learning programming, well sorta ive been ...

  1. #1
    Unseen
    Join Date
    Apr 2005
    Location
    ohio
    Posts
    7

    compilers

    hi im new to the board. Im a sophmore in HS and just started learning programming, well sorta ive been working with QBasic..havent got to c or c++ yet..i understand QBasic but dont exactly know how to test the scripts ive been writing. I was on another board so i would put it on there and they tested them for me ..so what im asking is if i dowload a compiler, and enter the script in the program, would it do anything to my PC, or just show me what ive done??? any information would be great...my email is .... thanks alot


    Gregg

  2. #2
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    I don't know about QBasic interpreters (I presume... I've never used it). Anyway, a C/C++ compiler such as GCC (www.bloodshed.net -- the popular Dev-C++ IDE for GCC) will simply create the program that you have written (or alert you to errors that prevented it from doing this). What the program does is a matter of how you wrote it. Just starting with C++, however, the worst you really could do is overwrite a file that you shouldn't (when you get around to file I/O), but in that case, you really have to be consciously trying to screw things up.
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,659
    > any information would be great...my email is .... thanks alot
    Find the box which says "email me when there are replies" and tick it.
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  4. #4
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    The differene between a compiler and interpreter, is that a compiler will actually translate your source code into machine code. An interpreter will leave your source code as it is, and just perform that actouns contained in it. Both are available for QuickBasic. I'd recommend QuickBASIC 4.5 - very easy to use, does both.

    When you compile a program, it just makes your source code into a program just like any other program you'd use. What that does to your computer depends on the source code. With QuickBASIC, you really have no need to worry. It's a very simplified language, and it's pretty hard to make it do anything harmful unless you really try. When you get into lower-level languages like C and C++, you need to be a little more careful because they give you the ability to directly interface with memory.

  5. #5
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    Quote Originally Posted by Zach L.
    Just starting with C++, however, the worst you really could do is overwrite a file that you shouldn't (when you get around to file I/O), but in that case, you really have to be consciously trying to screw things up.
    be a little careful when you say those things... you should visit a class of high-schoolers that think they can program because they've had experience with HTML, and they hit their first chapter on looping... admittedly, a blue screen is not much, but when you have an entire classfull of computer hardbooting every minute, it starts to wear on your nerves...

    not that this is unseen's case, because he/she already has experience with a language.
    Last edited by major_small; 04-07-2005 at 11:22 AM.
    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
    Unseen
    Join Date
    Apr 2005
    Location
    ohio
    Posts
    7
    thanks alot for your guys' help. See im just doing this thing online. To teach me the qbasic language, it gives you a statement than says write this information into a program using QBasic and gives me numbers- heres an example

    ' Restaurant Bill calculator
    '
    PRINT "Enter the total before tax:"
    INPUT TOTAL

    PRINT "Enter the amount of tax:"
    INPUT TAX

    LET TIP = TOTAL * 0.15
    PRINT "Please pay:", TOTAL + TAX + TIP
    END
    Modify the program so that it writes out the amount of the TIP in addition to writing the total amount to pay.

    my answer was
    ' Improved Restaurant Bill calculator
    '
    PRINT "Enter the total before tax:"
    INPUT TOTAL

    PRINT "Enter the amount of tax:"
    INPUT TAX

    LET TIP = TOTAL * 0.15
    PRINT "The tip is:", TIP
    PRINT "Please pay:", TOTAL + TAX + TIP
    END

    so i just want to see how it looks on my monitor, i dont think this would do anything to my hard-drive so im just going to dowload QUICKBASIC 4.5 and see whats happens, thanks again

    gregg

  7. #7
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429
    You really need to be learning ANYTHING other than quickbasic... that language is garbage and useless.... it doesn't even teach you good programming technique.

    Download any compiler... it's not going to do any damage to your computer unless you do some really low-level/memory management type programming.

  8. #8
    Unseen
    Join Date
    Apr 2005
    Location
    ohio
    Posts
    7
    alright im only 15 but i understand the programming concept so what shoud i work on than java c c++???? thanks

  9. #9
    Slave MadCow257's Avatar
    Join Date
    Jan 2005
    Posts
    735
    alright im only 15
    Don't let that hold you back, I myself started c++ at 11.

    so what shoud i work on than java c c++????
    I think you should just start learning c++. Learning any of those would be good though.

  10. #10
    Unseen
    Join Date
    Apr 2005
    Location
    ohio
    Posts
    7
    alright will do..so im gonna start with the tutorials on this site and get a book from the library...anything else that will help...i want to take a course at my local community college this summer, do you think thats a good idea?

  11. #11
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    Quote Originally Posted by unseen
    alright will do..so im gonna start with the tutorials on this site and get a book from the library...anything else that will help...i want to take a course at my local community college this summer, do you think thats a good idea?
    yeah, don't follow the tutorials on this site too literally - the code used in them is a bit outdated... the concepts are all right though.

    I think the community college courses are a good idea--I found that I needed a little human assistance to learn some things...
    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
    Registered User
    Join Date
    Apr 2005
    Posts
    35
    I am also a 15yr old sophomore in HS and am starting to program. Any class you take will help in whatever you are interested in. I myself am going to take EE classes this summer i hope.

  13. #13
    Unseen
    Join Date
    Apr 2005
    Location
    ohio
    Posts
    7
    yeh but no one at my school has any real knowledge on programming, not even my comp. teachers know that much about it, and no one in my family does...i usually take my programming notes to school and study them and people are like whats programming..so its kinda hard to get personal help, but ill look around thanks, all of you

  14. #14
    Registered User
    Join Date
    Apr 2005
    Posts
    35
    thats y we have experiments and this forum . Same situation at my school and family, know alot about comps but nothing with the programming of them ...o well, good thing there are tons of books and tutorials out there...thx l8er

    -fire

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C++ Builder Comparison
    By ryanlcs in forum Tech Board
    Replies: 14
    Last Post: 08-20-2006, 09:56 AM
  2. Is It Possible To Install Multiple Compilers?
    By mishna_toreh in forum C Programming
    Replies: 3
    Last Post: 05-13-2005, 07:32 AM
  3. Compilers for Windows
    By LegendsEnd in forum Windows Programming
    Replies: 2
    Last Post: 03-26-2004, 07:03 AM
  4. Compilers, Compilers, Compilers
    By Stan100 in forum C++ Programming
    Replies: 11
    Last Post: 11-08-2002, 03:21 PM
  5. target OS compilers
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 07-01-2002, 11:08 AM

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