April 30, 2024, 10:40:22 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Suggestion: MATRIX commands in eBasic

Started by paravantis, December 16, 2006, 01:42:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dennisc

... and from sunny South Africa - sorry Graham  :'( :'(
Failure is only the opportunity to begin again more intelligently
www.denniscomninos.com

J B Wood (Zumwalt)

And from warm and sunny mid florida :)
... back to translating C++...

John S

It's supposed to get down to 8 degrees F (-13 degrees C) here in Reno Nevada tonight!
John Siino, Advanced Engineering Services and Software

tbohon

What, exactly, is this "sun" thing of which you speak?  Up here in the Pacific Northwest all we have is clouds, rain and 90 mph windstorms which caused me to be totally without power for 8 days.  Let's use words to which we can all relate, OK?  :P

Tom
"If you lead your life the right way, the karma will take care of itself ... the dreams will come to you."  -- Randy Pausch, PhD (1961-2008)

Dennisc

QuoteWhat, exactly, is this "sun" thing of which you speak?ÂÃ,  Up here in the Pacific Northwest all we have is clouds, rain and 90 mph windstorms which caused me to be totally without power for 8 days.ÂÃ,  Let's use words to which we can all relate, OK?

SolarEnergy = SunShine + SolarPanel
For i = 1 to 365
ÂÃ,  ÂÃ,  ÂÃ, StorePower = Battery + SolarEnergy
Next i
If Sunshine <> Present Then ACVolt = Invert(StorePower)
Coder = Happy
End

Looks like your For/Next loop will be "For i = 0 to 0"

But then you could always have;

WindEnergy = Wind + WindTurbine..............

Sorry, couldn't resist.. :) ;) ;D ;D
Failure is only the opportunity to begin again more intelligently
www.denniscomninos.com

Barney

How about a simple GOTO ?

If NOT Enough_Sunshine THEN GOTO Bahamas

;D

Barney

Dennisc

GOTO? GOTO? This is the age of GOTOless programming (or so everybody keeps telling this old man)!
:) :) ;D

Dennis
Failure is only the opportunity to begin again more intelligently
www.denniscomninos.com

paravantis

If this is any consolation to all of you guys living in ...freezerito land, Athens, Greece is pretty cold this holiday season too.

And you know what? I greatly miss Christmas in Chicaco! Unless the wind chill hits you at minus 80, it doesn't really feel like Santa Claus season!

Anyway, happy holidays to everyone and a very happy new year to Paul and Ionic Wind!

:)

barry

Quote from: Dennisc on December 27, 2006, 04:59:36 AM
GOTO? GOTO? This is the age of GOTOless programming (or so everybody keeps telling this old man)!

I've never been that fashionable.  The fact is there are good uses for goto that can make programs easier to read.

Example:

get_input:
      input some_data
      if some_data = inadequate_data then goto get_input
      if some_data = some_other_bad_stuff then goto get_input

And yes, of course that can be done in a very simple and clear manner without gotos.  But it'll never beh quite this simple and obvious.

The more data checks you do before processing the data begins the more glaring the difference in simplicity

I agree that structured programming is good and should be used whenever it makes things clearer.  But not when it muddies the water even a little bit.

Teaching that gotos are naughty is fine to help students learn to think in terms of structures instead of being lazy but at some point they need to learn to think in whatever way fits the current criteria.  We can't expect them to be virgins forever.

Barry