< Prev | The Online Module Library | Next >

  Module: thermometer  


                           
Task:         thermometer (Int x, Int y, Int temp)

Description:  Draws a thermometer on your screen

Parameters:   x,y:  the location of the center of
                    the thermometer
              temp: the initial temperature (0-125)
___________________________________________________

Task:         temperature (Int temp)

Description:  Changes the thermometer's temperature

Parameter:    temp: the new temperature (0-125)

Module Source Listing


Example

The following example program draws a thermometer displaying a temperature of 68 degrees:

Example Program Source Listing

(The above program assumes that you've placed
the module into your Global Append Library.)


Example 2 - An Exploding Thermometer

The following example program draws a thermometer whose temperature rises from 68 degrees to 125 degrees. When the temperature reaches 125, the thermometer explodes:

Example Program Source Listing

(The above program assumes that you've placed
the module into your Global Append Library.)


How To Download The Module
Into Your Local Append Library

If you're feeling ambitious and have nothing better to do, you could just copy
the source listing by hand! However, there is a much easier way to do it:

  1. Copy the source listing into the Windows Clipboard

  2. Paste the Clipboard into a new text document in your project's "Library" folder

  3. Change the name of that new text document to the module's name

The module is now in your Local Append Library.

After the module has been placed into your Local Append Library, you can
either just leave it there, or you can transfer it into your Global Append Library:

How To Transfer The Module From Your Local
Append Library Into Your Global Append Library

  1. Drop the module's text file onto the "Librarian.exe" file

  2. Click "Win" when you are asked to select the intended universe

The module is now in your Global Append Library.




  [ Webmaster | FAQ's | Home Page | Contact Us ]

Copyright 2012 SiMPLE CodeWorks, Inc. All rights reserved.