A Tiny B.A.S.I.C. program for Trigsters

Shop Trig with GW-BASIC>

by Joseph_Sixpack

Back to GW-BASIC Table of Contents
Go to the Index of "The Last Book of GW-BASIC"
Okay, here it is.  A very simple concept that can pay off 
big and save you a lot of time in looking for your six 
dollar scientific calculator.
  (that's supposed to be a joke  :-)

Here is a tiny program that you can set up to run in a batch 
file or by memory when you startup GW-BASIC for machine shop 
purposes or for trig problems.  The program is called 
STARTUP.BAS and it goes like this:

If you are home alone, and aren't using a batch file the 
command from the prompt goes something like this:

gwbasic[.exe] startup[.bas]  (bracket content optional)
let me make that cleaner sans brackets:
   gwbasic startup
that's it.
here is what the program looks like:

     1  cls
     2  key off
     3  locate ,,,0,7
     4  pi=4*atn(1)
     5  r2d=pi/180
     6  print tab(10) "The Value of PI=";pi
     7  print tab(10) "The value of the radians to degrees factor is:"
     8  print tab(10) "PI/180=";r2d
     9  print "So to find the sine of 45 degrees for example"
     10  print "enter the question mark for the shorthand version"
     11  print "of print & then:    sin(45*r2d)    this will give"
     12  print "you the value of the sine of 45 degrees in degrees"
     13  print "and not value in radians."
     14 '  save"startup.bas", A
     15 '  system

After a while, you can just delete all the blab if you want 
from lines 6 to 13 and just keep it simple to just 
establish the value of the conversion factor contained in 
the variable "r2d"

That's it!  all first five lines, and lines 14 & 15 if you 

If you wanna show off you can get the startup program down 
to just 1 to 3 lines if you want.

1 cls:key off:locate,,,0,7:pi=4*atn(1):r2d=pi/180
2 save"startup.bas",a:'   system

All you are doing is just creating the value for PI and a 
conversion factor called (r2d) "radians to degrees" to 
translate the radian return for trig functions in gw-basic 
to degrees.

Other semi-automatic math thingys can be done too if the 
need be.

But for Joseph_Sixpacks who just crank handles, all you 
mostly need is the trig stuff and simple multiplication and 
addition, maybe even subtraction.

But beware, Compound trig was yet another headache for 
machinists in the last century.  M.O.W. (measurement over 
wires) for threads probably is okay in basic too,

Come to think of it, see your machinist's handbook for more 

Go to TOP of Page
Back to GW-BASIC Table of Contents
Back to GW-BASIC Index
Hosted by www.Geocities.ws