Download Latest Version CppBasic001.zip (260.7 kB)
Email in envelope

Get an email when there's a new version of C++ Basic

Home
Name Modified Size InfoDownloads / Week
readme.txt 2013-06-19 7.1 kB
CppBasic001.zip 2013-06-16 260.7 kB
Totals: 2 Items   267.8 kB 0
                         The C++ Basic version 0.0.1
                        =============================

Introduction.

The C++ Basic is a programming language with features from C++, Basic and Java.

It has dynamic arrays, automatic garbage collection, exceptions, support for interfaces and other advanced features.

It may be useful to write console applications for DOS and Windows operating systems.

A C++ Basic project is written and debugged with the Visual C++ 2008 Express Edition on the Windows XP operating system.
It is developed and distributed in a directory with the 'bin', 'doc', 'ide', 'include','lib' and 'src' subdirectories.
A project is compiled to produce either '.exe' program in the 'bin' subdirectory or '.lib' library in the 'lib' subdirectory.
A C++ Basic project may use libraries, located in the '.lib' subdirectories of the other C++ Basic projects.

A C++ Basic program exists in the compilable and non-compilable forms.
The non-compilable form is simplier, for example, (some types of) local variables are not declared and no '.h' files are necessary.
The non-compilable form is converted to compilable C++ (and vice versa) with the 'CppBasicConverter', that automatically generates the '.h' files.
The 'CppBasicConverter' is used as an external tool in the Visual Studio, so the conversion process is very easy.  

Some projects, for example 'CppBasicConverter', are designed to run only on the WINDOWS operating system (as console applications).
But other projects should run on DOS under the HX DOS EXTENDER. 

The 'CppBasic 0.0.1' project (C++ Basic version 0.0.1) has no support for multithreading, GUI or internet.
This support will not be included also in the future versions of the 'CppBasic' project (for modularity reasons), but may be
provided in other C++ Basic projects.

There is a small number of built-in classes: Object, String, File, Directory, IntArray, 
ObjectArray, StringArray and several more classes, that are less important for the 
beginner. 


Installation.

1. Make sure that your operating system is the Microsoft Windows XP.

2. Make sure that your computer is connected to internet.

3. Create the directory for C++ Basic projects and associate it with the virtual disk P:. 

   For example, you may create the directory, named 'C++ Basic Projects' on disk C: and
   run the free 'VSubst.exe' program to associate it with the virtual disk P:.
   Search for 'Vsubst.exe' to download it.

4. Extract the 'CppBasic 0.0.1' directory to 'P:\' from the 'CppBasic001.zip'.

5. Make sure that the Visual C++ 2008 Express Edition is installed on your computer.
   The Visual C++ 2008 Express Edition is free and can be dowloaded from the Microsoft site.
   Search for 'Visual C++ 2008 Express', download and run the 'vcsetup.exe'.

6. Run the Visual C++ 2008 Express Edition.

7. Click Tools->Import and Export Settings, choose 'Import selected environment settings' option and click Next.
   Refuse saving current settings by choosing 'No, just import new settings, ovewriting my current settings', and click Next.
   Browse to choose the 'ExternalTools.vssettings' in the 'tools' subdirectory of the 'CppBasic 0.0.1' directory, and click Next.
   Choose to import 'All Settings', and click Finish.   


Getting started.


To write a program in C++ Basic do the following:

1. Prepare the directory for the new C++ Basic project, by copying the 'ProjectName 0.0.1' folder in the 'tools' subdirectory of the 'CppBasic 0.0.1' directory to 'P:\'.
   Rename the new directory by substituting the 'ProjectName' with the name of the project, for example 'MyProject'.
   The project name must start with capital letter and contain only letters and digits (no spaces or other symbols).
   The version number '0.0.1' (after the space) may be changed if desired, but the format of three integers, separated by '.' must be preserved.  

2. Run the Visual C++ 2008 Express Edition.


3. Click File->New->Project, then choose the project type "Win32" and the project 
   template "Win32 Console Application".
   Choose and enter the name and location of the project.
   For example, enter MyProject as the name and P:\MyProject\ide as the location (you may browse to it).
   Uncheck the 'Create directory for solution' box.  
   Then click 'OK'.  
   The 'Application Settings' form will appear.   
   Click 'Application Settings', check the 'Empty project' box and click 'Finish'.

4. Copy the 'test.cpp' program from the 'examples' subdirectory of the 'CppBasic 0.0.1' directory to 'P:\MyProject 0.0.1\src\'.

5. Right click 'Source Files' in the Solution window and add the 'test.cpp' as an 'Existing Item'.
 
6. Set the Active Configuration to 'Release' (using the toolbar or clicking Build->Configuration Manager). 
   Click Project->MyProject Properties and then:
     1. set the Optimization to 'Minimize Size (/O1)' (in Configuration Properties->C/C++->Optimization).
     2. set the Whole Program Optimization to 'No' (in Configuration Properties->C/C++->Optimization).
     3. set the Debug Information Format to 'Disabled' (in Configuration Properties->C/C++->General).
     4. set the Enable C++ Exceptions to 'No' (in Configuration Properties->C/C++->Code Generation).
     5. set the Enable Minimal Rebuild to 'No' (in Configuration Properties->C/C++->Code Generation).
     6. set the Warning Level to 'Level 3(/W3)' (in Configuration Properties->C/C++->General).
   Failing to set some of these properties increases program size several times.

   Set the Active Configuration to 'Debug'.
   Click Project->MyProject Properties and then:
     1. set the Runtime Library to 'Multi-threaded DLL (/MD)' (in Configuration Properties->C/C++->Code Generation).
        (This is necessary to avoid the warning error by the linker (because the 'CppBasic.lib' was built for this Runtime Library.) 
     2. set the Enable C++ Exceptions to 'No' (in Configuration Properties->C/C++->Code Generation).
     3. set the Enable Minimal Rebuild to 'No' (in Configuration Properties->C/C++->Code Generation).
     4. set the Warning Level to 'Level 3(/W3)' (in Configuration Properties->C/C++->General).


7. Open the "test.cpp" source file (by double clicking it in the Solution window).
   Make sure, that the focus is on this source file.
   
   Click Tools->To C++(CppBasic)

   The CppBasicConverter will run and convert the 'test.cpp' to compilable form.

   Click Tools->From C++(CppBasic)

   The CppBasicConverter will run and convert the 'test.cpp' to non-compilable form.

   Click Tools->To C++(CppBasic)

   The CppBasicConverter will run and convert the 'test.cpp' to compilable form.

8. Build the project (by clicking Build->Rebuild MyProject) and run it.
   Do it in the 'Debug' and 'Release' configuration mode.

   In the 'Debug' mode, you may set the Working Directory and the Command Arguments (by clicking Project->MyProject Properties, then Debugging in the Configuration Properties).
   
Source: readme.txt, updated 2013-06-19