Saturday, February 23, 2008

Hello World!

For every new programming environment, we create a "Hello World" program that simply displays those two words when running. Below is a comparison of each Hello World program for each of the program languages we have used in terms of code and test run.

"Hello World" in Turbo Pascal

This program does nothing more than display two words of text in a specific position in a red colour. The program uses GoToXY to position the words in a certain spot on the screen. To skip lines in the program I used Writeln;.

Program Hello;

{ This program displays 'Hello, World!' near the centre of the screen.
Eliza Labrador
ICT 12 Block D
September 11 2007 }

Uses
NewDelay,
Crt;

Begin { Main }
ClrScr;
TextColor(Cyan);
GoToXY(35,9);
Writeln('Hello, World!');
GoToXY(20,13);
Writeln('I might like to become a medical imager.');

Writeln;
Writeln;
Writeln ('Press [Enter] to stop');
Readln;
End. { Main }

-----------------------------------------------------------------------

Hello World in Visual Basic
We created a ‘form’ or program that displays three types of information: two labels (text), an image, and a command button. We were able to change the color, font style, and size for the labels and resize an image. Finally, we used a command that allows the user to end the program when they click the “End” button using the following code (Private Sub cmdQuit_Click() Unload Me. We edited the Name of each aspect, as well as the captions that display on the program. Each “Name” began with an abbreviation composed of three lower case letters (ex: imgND, lblHeading.)
'Introductory Hello World Program
'By Eliza Labrador
'ICT 12 D
'October 22, 2007
'
Private Sub cmdQuit_Click()
Unload Me
End
End Sub

Private Sub Form_Load()
imgND.Visible = True
lblHelloWorld.Visible = True

End Sub

-----------------------------------------------------------------------

Hello World in Python
In this program, we use the word "print" for output statements
-----------------------------------------------------------------------

Hello World in C++
Here we used a 'cout' statement to display words. "endl;" was used to skip lines.
// My First C++ Program
// February 2007
// Eliza Labrador
//

#include
using namespace std;

void main () //void means that this function (program)
//returns nothing after it has run
{
cout << "Hello world by Eliza Labrador";
cout << "My program runs" << endl;
cout << endl;
cout << endl;
cout <<>

Friday, February 15, 2008

C++

Our class has recently installed Visual C++ Express Edition on our home computers. Recently we have coded programs including the standard "Hello World" test, calculation of area, calculation of gross and tax amounts, and conversion of human years to dog years. We have only covered the basics of this new coding language. There is still so much to learn!

Until next time!
--->ELIZA!

Wednesday, February 6, 2008

OLPC -- Update*

There has been an obvious delay in the delivery of the XO laptop we bought from the "Give One Get One" program. Our donation has already gone to the placement of a machine being delivered somewhere in the world. Here is a message explaining the updates on the delivery delay from Nicholas Negroponte:

Dear Peter,

Please accept my apologies for the delay in receiving your XO laptop. Give One Get One was such a phenomenal success that we over-taxed our order processing and payment systems. Demand exceeded supply. Additional XO laptops are being built now and will be delivered in 45 to 60 days. If you wish to reconsider your contribution in the face of this delay, we will issue a refund to you. We have set up a dedicated phone line for these requests. The number is 1-800-883-8102. In the meanwhile, please know that laptops are in the process of going to Mongolia, Cambodia, Afghanistan, Rwanda and Haiti as part of the "give one" side of the equation. Fortunately, OLPC's mission of getting laptops to the children in these countries has not been delayed. In Mongolia, the children are already enjoying themselves and learning new things with their XO laptops. Please see: http://wiki.laptop.org/go/Ulaanbaatar. Eliminating poverty through learning is gaining wider acceptance thanks to support like yours.


Sincerely,

Nicholas Negroponte
Chairman
OLPC Foundation