Author Topic: Learning to Program Responses  (Read 25511 times)

0 Members and 2 Guests are viewing this topic.

Offline metalfoot

  • Newbie
  • *
  • Posts: 27
Learning to Program Responses
« on: April 23, 2010, 12:18:43 PM »
Great idea. Please keep going.

Offline GWS

  • Partner Developer
  • Hero Member
  • *****
  • Posts: 1492
Re: Learning to Program Responses
« Reply #1 on: April 23, 2010, 12:24:09 PM »
Hey MF ..  :) .. maybe you're the one person in the World who's interested.

Excellent - just chime in with questions at any point ..  ;D

I'm always pleased to chat about anything programming-wise.

By the way, the above example works just the same in EBasic .. so to some extent, people would be getting familiar with both languages. ;)

Graham :)
Tomorrow may be too late ..

Offline aurelCB

  • Hero Member
  • *****
  • Posts: 1008
Re: Learning to Program Responses
« Reply #2 on: April 23, 2010, 12:48:11 PM »
Great idea Graham... :)
What to say else...
And yes Creative Basic is fascinating simple and useful programming language.
I really enjoy make programs in it... ;D
forum for hobby programming:
http://basicpro.mipropia.com/smf/index.php

Offline GWS

  • Partner Developer
  • Hero Member
  • *****
  • Posts: 1492
Re: Learning to Program Responses
« Reply #3 on: April 23, 2010, 01:40:54 PM »
Hi Aurel,

I don't think people have ever really appreciated it's merits.
It's certainly the most useable, general-purpose software I've discovered in many years.

I hope to demonstrate why that is so. :)

Graham
« Last Edit: April 23, 2010, 02:54:20 PM by Larry McCaughn »
Tomorrow may be too late ..

Offline Egil

  • Paid Subscriber
  • Hero Member
  • *****
  • Posts: 912
    • LA2PJ
Re: Learning to Program Responses
« Reply #4 on: April 23, 2010, 03:59:29 PM »
I kind of like your idea Graham. ;D  Almost can't wait till the next chapter arrives...
I gave my ten years old gandson a demonstration, and the verdict was 'COOOOL'.  But he hasn't learned english yet, so I had to promiss him to translate your lessons into norwegian.

By the way, there is a typo in your first lesson:
Quote
using the ‘File – Save As’ menu.  Give it a name such as ‘cbcons.iba’
It will work better with:
Code: [Select]
using the ‘File – Save As’ menu.  Give it a name such as ‘cbcons.iba’
And when you consider yourself done with these basic routines, maybe you'll proceed with more general programming algorithms. Such as sorting, FIFO-buffers etc....  ::)

EB users can also find very useful information at: http://ebasic.wikispaces.com/. Maybe a similar service for Creative Basic users should be started?
Anyway, most beginner difficulties regardless  of language version, can easily be solved by using the forum's search funtcions, or by asking the forum members.

Support Amateur Radio  -  Have a ham  for dinner!

Offline GWS

  • Partner Developer
  • Hero Member
  • *****
  • Posts: 1492
Re: Learning to Program Responses
« Reply #5 on: April 24, 2010, 12:06:29 AM »
Thanks for the comments Egil ..  :)

I'm sat here puzzling about the typo .. your two lines seem to be identical.  I assume you meant my putiing 'iba' instead of 'cba'.

Yep that was an error - I expect I'll make many ..  ::)  These things are just coming from my fingertips ..  :)

I've no idea where it might lead - it's a sort of 'Lazerus' experiment ..  :)
I'm trying to inject a bit of interest into programmers who maybe pass by, but usually don't say anything.

Maybe it will get more popular and busy round here. ;D

Nice to hear your grandson was interested .. my grandaughter is in 'senior' school now - all grown up - but they don't get taught how to program.  I think that's a shame.

I've not had good experiences with WikiPedia - their moderators are so snooty you wouldn't believe.  Haven't tried Wikispaces though.

Anyway, we'll see how it goes.  I'm still waiting for the first programming question ...  :o
It will be nice to get a bit of interaction going ..  ;D

all the best, :)

Graham

Tomorrow may be too late ..

Offline GWS

  • Partner Developer
  • Hero Member
  • *****
  • Posts: 1492
Re: Learning to Program Responses
« Reply #6 on: April 24, 2010, 03:11:56 AM »
 ;D ;D ;D

Graham
Tomorrow may be too late ..

Offline GWS

  • Partner Developer
  • Hero Member
  • *****
  • Posts: 1492
Re: Learning to Program Responses
« Reply #7 on: April 29, 2010, 06:18:23 AM »
Hi folks,

I've just posted section 5 dealing with arithmetic and string operations.

Since this is off the top of my head, there might be a mistake or two, or maybe an explanation could be improved.

Feel free to ask any questions, or make any (hopefully helpful) questions.

best wishes, :)

Graham
Tomorrow may be too late ..

Offline Egil

  • Paid Subscriber
  • Hero Member
  • *****
  • Posts: 912
    • LA2PJ
Re: Learning to Program Responses
« Reply #8 on: April 30, 2010, 09:13:45 AM »
Thanks again Graham!
Been away for some days, just to find you have produced more translating work for me...

When I started out using EB and CB, the same skelleton program as you mention was used.
Code: [Select]
openconsole



do:until inkey$<>""
closeconsole
end

But sometimes it was very annoying to notice that the program terminated before I had time to inspect the result, just because I accidentally touched the keyboard.
My solution is this:
Code: [Select]
OPENCONSOLE


DO:UNTIL INKEY$ = CHR$(27)  ' Loops until the ESCAPE key is pressed
CLOSECONSOLE
END
Now the program don't stop until the ESCAPE key is pressed. Any key can be used in stead of the ESCAPE key.
Maybe other also find this tip useful.

Good luck!
Support Amateur Radio  -  Have a ham  for dinner!

Offline GWS

  • Partner Developer
  • Hero Member
  • *****
  • Posts: 1492
Re: Learning to Program Responses
« Reply #9 on: April 30, 2010, 10:04:44 AM »
Yep, true enough ..  :)  .. you can select any key you like to wait for ..

It's a nice flexible statement and works well.

Graham  :)
Tomorrow may be too late ..

Offline Code Scrambler

  • Spaghetti is for eating, not programming!
  • Newbie
  • *
  • Posts: 1
Re: Learning to Program Responses
« Reply #10 on: November 14, 2010, 10:33:33 PM »
Thanks for the effort you put into these short lessons, Graham.  A couple of them helped me solve some coding problems I was having.

(New to CBasic, not programming.)

Can anyone post coding tips here, or should I use a different area?

First tip that comes to mind is the the first one I learned:  "You can NEVER over comment your code!"

Second tip that I'm reminded of is:  "When someone tells you the code is easily ported to another programming language, it's best if you analyze what it does, then write a new program from scratch."

Anyway, feels good to dust off the coding skills with a version of Basic that's actually about the easiest to use, of the dozen or so that I've looked at recently.
« Last Edit: November 14, 2010, 10:36:35 PM by Code Scrambler »
My goals when I write code:  Simple.  Efficient. Annotated!

Offline LarryMc

  • Administrator
  • Hero Member
  • *****
  • Posts: 5964
  • 'All I like is finishing'
Re: Learning to Program Responses
« Reply #11 on: November 14, 2010, 10:43:51 PM »
Can anyone post coding tips here, or should I use a different area?
Try to make what you post(that is new) fit the section within Creative Basic board (as close as possible).

You can create as many new topics within the appropriate section as you want.

Welcome aboard.

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Offline GWS

  • Partner Developer
  • Hero Member
  • *****
  • Posts: 1492
Re: Learning to Program Responses
« Reply #12 on: November 15, 2010, 11:47:22 AM »
Hello Code Scrambler ..  :)

Glad you're enjoying Creative - it's a classic development language for Windows applications.

Sorry I've gone a bit quiet recently .. some serious family health issues have arisen, that have pretty well halted my creative efforts.

When the dark clouds will lift I don't know  :(

But you can be sure .. 'I'll be back' ..  :)

Graham

Tomorrow may be too late ..