Saturday, December 1, 2012

ISO C++ Standard 2011

A new ISO Standard for C++ was issued in 2011 and has been implemented in the latest C++ compilers.  I searched for an explanation of this standard after trying to compile a short C++ program that used
a structure containing a character string.

The compiler reported an error for both these statements:
char* mystring = "John";
string mystring = "John";
The error stated that ISO prohibited the initiation of a constant string.

There are still a lot of C++ books and a lot of C++ tutorials that implement this old style of initiating strings.  And this is fine for people working with old compilers. However people working with new compilers or free on-line compilers will experience difficulties with the two C++ statements above as well as in other C++ statements.

I found a C++11 on-line reference at

C++11 Reference

The ISO 2011 C++ Standard costs about $30.00 to download. So I searched further and found a ISO 2011 C++ FAQ for which I provide the link below:

C++11 - the new ISO C++ standard



Thursday, September 27, 2012

Small Basic: A Simple Addition Program

Here is a simple Microsoft Small Basic Program that adds two numbers and displays the answer.

'Create a Graphics Window
GraphicsWindow.Show()
'Create caption and text box for the first variable
GraphicsWindow.DrawText(20,20,"Enter First Number")
typedvar1 = Controls.AddTextBox(200,20)
'Create caption and text box for the second variable
GraphicsWindow.DrawText(20,120,"Enter Second Number")
typedvar2 = Controls.AddTextBox(200,120)
'Create caption and text box for the answer
GraphicsWindow.DrawText(20,220,"The answer is")
Answer1 = Controls.AddTextBox(200,220)
'Create a button for adding the two variables
Controls.AddButton("Add", 220,400)
'The answer goes in textbox labeled Answer1
Controls.SetTextBoxText(Answer1, "  ")
'Execute subroutine named buttonsub when add button is clicked
Controls.ButtonClicked = buttonsub
'Subroutine executed when add button is clicked
Sub buttonsub
  'fetch two numbers entered
  var1 = Controls.GetTextBoxText(typedvar1)
  var2 = Controls.GetTextBoxText(typedvar2)
  'Add the two numbers
  var3 = var1 + var2
  'Display the sum in the textbox named answer1
  Controls.SetTextBoxText(Answer1,var3)
EndSub



Tuesday, August 28, 2012

Microsoft Small Basic: A Simple Program With Two Buttons

Here is a simple Small Basic program that uses two buttons. When a button is pressed, a window message pops up naming the button that was pressed.


GraphicsWindow.Show()
'Add the button labeled Exit
ExitButton = Controls.AddButton("Exit",20,50)
'Add the button labeled Hello
HelloButton = Controls.AddButton("Hello",20,20)
'When a button is clicked, call the ButtonsBeenClicked subroutine
Controls.ButtonClicked=ButtonsBeenClicked

Sub ButtonsBeenClicked
  'If the Hello button was clicked, display the message Hello Button Presssed
  If controls.LastClickedButton = HelloButton then
    GraphicsWindow.ShowMessage("Hello Button Pressed","Button Message")
    'Else if the Exit button was clicked, display the message Exit Button Pressed
    ElseIf controls.LastClickedButton = ExitButton then
      GraphicsWindow.ShowMessage("Exit Button Pressed","Button Message")
  EndIf
EndSub




Friday, August 24, 2012

Microsoft Small Basic: Where To Get Help

After downloading and installing Microsoft Small Basic and the free tutorial Introducing Small Basic, the next logical question is: "Okay. If I need help, where do I go?"

Of course, the first place I turned to was the Microsoft Small Basic Forum at MSDN

MSDN Small Basic Forum

Another place to get help is

Small Basic Web Site

If your primary goal is creating kid's games than this book might be very helpful

Programming Kid's Games With Microsoft Small Basic


Thursday, August 23, 2012

Microsoft Small Basic: A Graphical Programming Language For Beginners

I've been tinkering with Microsoft Small Basic over the past several months. At the time of this writing, Microsoft Small Basic is available for free at the URL listed below.  Microsoft Small Basic is intended for beginners. The free tutorial is titled Introducing Small Basic and it is relatively easy to read and follow.

The editor is easy to use and the programmer is guided step by step through each program line the programmer types in. I like it very much.

I also purchased a book titled 'The Developer's Reference Guide to Microsoft Small Basic.'  This reference guide is actually a tutorial for anyone familiar with programming. It is a reference guide for beginners. And, thus far, it has been helpful. Unlike Visual Basic, Small Basic does not have the drag and drop feature for adding text boxes, buttons and drop down menus to a program. It is an object oriented graphics programming language, but the explanation is simple enough so that the programmer unfamiliar with object oriented programming can understand it.

I'll write more about Microsoft Small Basic as I explore it. Right now, I recommend it for anyone who wants to learn how to program.

Download Microsoft Small Basic Here

Look around for the Microsoft Small Basic Reference Guide. I was able to find one selling for $19.99 at Amazon. Here is a URL where you can purchase the Reference book. Unfortunately, the lower priced one is no longer listed.

Microsoft Small Basic Developers Reference Guide

Here is the URL for another Microsoft Small Basic Book:

Beginning Microsoft Small Basic




Saturday, June 23, 2012

Book Review: Pointers on C

The book 'Pointers on C' is an excellent book for the person with a working knowledge of the C language. If the reader does not know this, the reader will be made painfully aware of it in the first chapter.  Instead of the typical "Hello World" one line program, the program explained in the first chapter is one only a person who has written programs would understand. In the explanation of the program and throughout the rest of the book, the author sites good and bad programming practices. This is exactly why I like this book. It covers C programming in a unique way.

In the second chapter, the author discusses lexical rules and the importance of good program style. Each chapter is devoted to one topic: Data, Statements, Operators and Expression, Pointers, etc.

As the reader probably guess, the book elaborates on pointers.  There are three chapters focused on pointers and chapters with partial focus on pointers. These chapters include the chapters titled Arrays, Using Structures and Pointers and Advanced Pointer Topics as well as many other chapters. 


The book also contains a chapter on the Preprocessor, abstract data types and the run-time environment.


This book is a practical book on the C language. I've had this book for years and have referenced it while I was an embedded systems software engineer. 


Pointers on C
Written by Kenneth A. Reek
Published by Addison-Wesley
ISBN 0-673-99986-6




Tuesday, June 19, 2012

Object Oriented Programming With Turbo C++

The book Object Oriented Programming With Turbo C++ has received mixed reviews on the Internet. This book is not a tutorial on C++. The book explains and provides the code for Object Oriented Programming applications.

After a brief introduction to Object Oriented Programming, the book explains and presents two versions of a File Browser Program. The first version does not use Object Oriented Programming. The second version uses Object Oriented Programming.

The book can be very confusing if the reader tries to read it like a text book. Reading it does not suffice. As the reader reads it, the reader should create an index of functions, classes, data and the pages they are on.

The disadvantage is that the program was written in Turbo C++ 1.0.  However, there is a free version of Turbo C++ that works on Windows ME, Windows 2000, Windows XP, Windows 7 and Windows NT.
You can download it at the following site:


In addition, there is a book
Turbo C++: The Complete Reference
written by Herbert Schildt
available on the Internet.

I am not affiliated in any way with the web sites and the author or publisher of the Turbo C++ books presented in this blog.