Programming saved me from calculus

Submitted by Nicola Rainiero on 2012-06-17 (last updated on 2012-07-30)

At the beginning for necessity: I needed a tool to speed and to check the exercises at the University, today I reduced drastically times in designing.

Sometimes a casual event leads to a surprising result, like the finding of an twelve years old calculator, a Sharp PC-E500S in the original box and yet in a good state of conservation.

It had been given to my brother for Confirmation Sacrament. After a short time it was neglected and leave inside a carton for years... So What was I supposed to do? I had already had a simple scientific calculator, but without the qwerty keyboard and the programming ability like the first type. It was a real pocket computer, programmable in BASIC, a language familiar to me. OK, but these considerations do not answer at the previously question!

La scatola originale della Sharp PC-E500S, parte superioreLa scatola originale della Sharp PC-E500S, parte inferioreCopertina del manuale in italiano della Sharp PC-E500S

I had found the manner to use it, while I was doing some repetitive exercise of hydraulic structures. In these exercises I had to repeat more and more times the same calculations in a infinitive series of operations with the real risk to make errors. And if I had changed the input data to increase the number of exercise for practice, how would I have compared the results?

This calculator answered my problems, giving to me the opportunity to take again my old knowledge of BASIC programming. I converted in algorithm the boring operations and in some programs I introduced iterations and conditional controls.

The main difficulty was the little free memory available in it (just 22 kilobytes)... I had to work in economy: reducing comments, input data and number of instructions and using the outlawed GOTO[1].

I carried out and saved in its memory 15 little BASIC programs (3374 free bytes of memory). Here it the list with name, description and memory used:

PEQUI.BASEquilibrium slope of a torrent2025
PIPON.BASGushing back and digging out at the foot of a bridge1876
SCO.BASReef to protect the bottom and banks of a river891 
VCOLL.BASCollector tank flow686 
VASCQUI.BASBasin sink with narrowing1713 
VASCI.BASBasin sink with a slide2192 
DISS.BASLongitudinal desanding683 
DISO.BAS Longitudinal deoiling815 
SERBA.BASPipeline system for a supply of 3 tanks1174 
DRENA.BAS Drainage tunnel553 
POZPOT.BATPower of a pump in aquifer (confined or not)1068 
PAFFON.BASWell self-sinking619
SFCALI.BAS Spillway goblet869 
ATTRAV.BASChannel crossing798 
INVASO.BASStorm sewer with linear reservoir model2515 

Today I take my Sharp calculator with me but I use it for simple operations, because compared to my PC, keyboard is small and uncomfortable and I can't export the results in my relations... So what can I do if I have an hydraulic structures problem?

Simply I compiled my old program for PC using FreeBasic (Wikipedia has a little description) that it is compatible with the old version of BASIC like QuickBasic. I do it for a storm sewer design. I rewrote some part of code to improve the read of input data and above all to save the outgoing calculus and results in a file that I can copy in my relations.

The last version I fixed is not perfect and 100% stable, but it works very well for me and I am going to publish it, whit the source code naturally!



[ 1]  goto (GOTO, GO TO or other case combinations, depending on the programming language) is a statement found in many computer programming languages. It performs a one-way transfer of control to another line of code; in contrast a function call normally returns control. The jumped-to locations are usually identified using labels, though some languages use line numbers. At the machine code level, a goto is a form of branch or jump statement. In the past there was considerable debate in academia and industry on the merits of the use of goto statements.. Reference: Wikipedia

Related Content:

Nicola Rainiero

A civil geotechnical engineer with the ambition to facilitate own work with free software for a knowledge and collective sharing. Also, I deal with green energy and in particular shallow geothermal energy. I have always been involved in web design and 3D modelling.

Add new comment

The content of this field is kept private and will not be shown publicly.

Plain text

  • No HTML tags allowed.
  • Web page addresses and email addresses turn into links automatically.
  • Lines and paragraphs break automatically.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.