Page 2 of 2
Re: Let's learn to write programs with LiveCode
Posted: Sat Oct 23, 2021 5:04 pm
by richmond62
With LiveCode we will learn about OPERATIONS:
1. OPERATIONS with NUMBERS.
2. OPERATIONS with LANGUAGE.
3. OPERATIONS with PICTURES.
Re: Let's learn to write programs with LiveCode
Posted: Sat Oct 23, 2021 7:13 pm
by richmond62
----------------------
This is a "time out" posting where 'the teacher' talks anent methodology rather than continues with the class.
Anyone who has bothered to follow what I have presented here today will realise a number of things:
1. This is about as BOG BASIC as one can get.
This is the end result of experience dealing with 8-11 year olds.
2. It uses as little metalanguage as possible, avoids words such as STRING, VARIABLE and so on like the plague (as they
are NOT necessary, even if those of us who sat down in an empty classroom in 1975 thougth they were).
3. I have based this on 2 things;
3.1. Children 8-11.
3.2. My father (who died at 86 3 years ago) who wanted to learn LiveCode at 81 when he had
NEVER learnt any programming language in his life before, lived a whole continent away from me so could only
be instructed by "a thousand pretty pictures" and understood "bugger all" (as he so pointedly put it), "with all
that pompous language."
I have also taken into consideration that ALL the pupils / students I have taught programming classes to
from the Bin Harmal business college in 1989 in the UAE to the school children I teach now
have never had English as a first language, so one has to explain concepts in the simplest, most readily
understandable fashion possible, and cannot assume prior knowwlegde of either any sort of semi-sophisticated
level of English or a lexicon of programming terms in English.
----------------------
Re: Let's learn to write programs with LiveCode
Posted: Sun Oct 24, 2021 11:27 am
by richmond62
Before we go any further let's look at how we can adjust things we have made so they are
a bit easier to see:
-
-
-
We can adjust the
TEXT size in a
FIELD like this.
-
Re: Let's learn to write programs with LiveCode
Posted: Sun Oct 24, 2021 11:32 am
by richmond62
-
We can then
RESIZE our
FIELD to make space for our larger
TEXT:
-
-
Re: Let's learn to write programs with LiveCode
Posted: Sun Oct 24, 2021 12:01 pm
by richmond62
Re: Let's learn to write programs with LiveCode
Posted: Sun Oct 24, 2021 12:11 pm
by richmond62
Now we are going to give 2 sets of information to the computer:
2 INPUTS:
-
-
-
You will see that because we GIVE 2 pieces of information to the computer we CANNOT call them both 'it' so we have to put them into
HOLDERS.
We can make a
HOLDER just by naming it, and that
NAME can be anything that makes sense to us and does
NOT use a word from
the programming language.
In my example you will see I have chosen
YEARS and
GENDER as they make sense to me in this program.
Re: Let's learn to write programs with LiveCode
Posted: Sun Oct 24, 2021 12:21 pm
by richmond62
Now we need to tell the computer to perform an
OPERATION with those 2 pieces of
information in those
HOLDERS:
-
-
-
Re: Let's learn to write programs with LiveCode
Posted: Sun Oct 24, 2021 12:23 pm
by richmond62
-
As you can see we are already
COMBINING NUMBERS and
TEXT in our
OUTPUT.
Re: Let's learn to write programs with LiveCode
Posted: Sun Oct 24, 2021 1:12 pm
by richmond62
---------------------------------------------
Now, let's take a break from
PROGRAMMING to go back to why
LiveCode uses the word
STACK for what
is, apparently, a windows or a piece of paper on which we can draw things.
A
LiveCode STACK can have as many
CARDS as it wants: just exactly like a STACK of CARDS or the PAGES in a book:
-
- playingCards.jpeg (7.24 KiB) Viewed 6512 times
-
- book.jpeg (4.89 KiB) Viewed 6512 times
-
---------------------------------------------
Re: Let's learn to write programs with LiveCode
Posted: Sun Oct 24, 2021 1:20 pm
by richmond62
This is very useful as we can use different
CARDS for different JOBS.
For instance: here's a stck with 2
CARDS where the front
CARD contains the
PROGRAM TITLE and the second
CARD
is where the
OPERATIONS take place:
-
-
-
You will see that the front
CARD has a
BUTTON to take the user to the second
CARD.
Re: Let's learn to write programs with LiveCode
Posted: Sun Oct 24, 2021 1:32 pm
by richmond62
We can give
CARDS NAMES so that it is easy to refer to them:
-
-
-
and easy when we want to move between
CARDS:
-