views:

436

answers:

2

In the "old days" I was working with Linux to create C/C++ programs (really really BASIC...HA!...programs, just learning to program in the courses as an intro) by creating a text file with the source code that was then fed to the compiler/linker that then spit out the executable binary.

Everything was in a text file or series of text files. I could cut and paste between them for tidbits of code to reuse or back up or place in papers I was typing with examples and explanations. If I really wanted to I could even print them out, and if I typed them all back in without a typo the programs worked just fine!

Now I'm trying some things under Visual BASIC 2008 Express many many years after doing those other toe-dippings into the pool of programming and while I may simply be confused to this idea, is it possible to have a "backup" of the source code...even a complete printout...of what comprises the program?

By that I mean before I had a series of text files that encapsulated everything but the standard libraries. I could sit down with a printout and trace through what was happening in it and highlight typos and logic errors and go back in to fix it. With VB 2008, to reproduce a program I'd have to open a new project, select whether console/service/forms, and insert snippets of code to get it to work? Or can I somehow have one file with my own code that comprises all the sources for classes/modules/subroutines/functions and feed it to the command line compiler to work with?

Is there a way to create (or extrapolate) a text file of my source code to create a VB application from a project that can be fed into the Visual Studio Express command line compiler?

I'm hoping I'm describing this clearly enough to be understood...maybe they'll make a new badge for understanding incoherent descriptions if you can get through this one...

+1  A: 

When you create a program in VB2008 you are creating various text files. The templates (console/service/forms) are just helping you by provided pre-canned code to your text files. You can create a project add some code then go and print out all the text files as you did before.

The "project" file itself is merely telling the IDE which text files are part of your project, how to "feed it to the compiler", what standard libraries are required, and so forth. The project file itself is just a text file.

If you open windows explorer and navigate to the location of your newly created project file you can find the text files you are looking for then print them as you would any other file.

Hope that helps.

another average joe
A: 

It's still just a bunch of text files. You can print any of them out.

In order to compile them from the command line you'd use this:

http://msdn.microsoft.com/en-us/library/380cz5k4(VS.80).aspx

In order to keep things organized and maintain project settings there is a solution file and a project file. You might want to get used to Visual studio though. It automatically highlights your typos for you and you can step through it in the debugger as it's running.

McAden