|
SESSION 6 Part3 |
Your first time programming -
continued |
|
|
|
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
 |
 |
|
Alright, let's try running it.
Press the
debug button
(Debug Main Project).
The IDE will compile
the source code,
and
when it's finished it
will run it automatically.
(It will finish compiling
in
less than a second.)
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
At last.
Alright, let's run it.
Waah,
I wonder what will
happen…
Go!! |
|
|
 |
 |
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
|
|
|
|
|
 |
*heart pounding* |
|
|
|
 |
Run Results (Output Window) |
|
|
|
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
Ahh!
It's displaying something!
There's some English
words…
Hello…World…!?
|
|
|
 |
 |
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
 |
 |
|
Hello World!
Welcome!
To the world of
programming!
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
 |
 |
|
This is a program that is often used
at the beginning in programming manuals.
It simply makes the defined text display
as standard output.
It may only be a single line, but even so
this is a splendid program.
You've shown respect for your
predecessors. That's why it's a ritual. |
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
Wooow….
They've let me become
a member of their ranks.
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
 |
 |
 |
|
|
|
|
 |
|
|
|
|
*teary-eyed* |

|
|
 |
Hey, aren't you
overdoing it a bit…
Ah, it's all good. |
|
|
|
|
|
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
By the way,
mistakes in programs
are called "bugs",
which comes from
bugs (insects).
In other words,"debug"
means
to remove the
insects (bugs).
It refers to fixing the
mistakes
in a program.
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
 |
 |
 |
|
|
|
|
 |
|
|
|
|
|
|
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
This "debug"
(debug main project)
is a run mode that allows you
to
examine the bugs
in your program.
It can stop the program at the
spot
where an error (malfunction)
occurs,
and it can display the run
status…
The IDE will help you search for
mistakes.
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
 |
 |
 |
|
|
|
|
 |
|
|
|
|
|
Mistake
bugs… |
 |
|
|
It can't catch errors
using the
normal run mode.
By the way, 'normal run'
is the
triangular button
next to it.
For now, don't use it.
|
|
|
|
sorry, this is a
Japanese joke. |
 |
|
|
|
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
 |
 |
|
If they're just bugs,
we'll ignore the bugs!
Just kidding!
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
|
|
|
|
|
|
 |
Bugged |
|
|
|
|
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
Ah… Ah! Also…
When you press the debug button,
all the source files that you've
changed
will be automatically
saved
when they run.
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
 |
 |
 |
|
|
|
|
 |
|
|
|
|
|
this -- this is..
apanese joke..
this is a… is a…
Japanese |
 |
joke… this is… |
|
 |
Ahahaha!
NAPO-chan is
bugged too!
You can't ignore
the bugs! |
|
|
Ahhhh,
if only I could
ignore you, too… |
 |
|
 |
I'm not a bug,
you know.
I'm gonna start
sulking soon… |
|
|
|
|
Standard Input / Standard Output |
|
|
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
That
"standard output"
thing from before,
what is it?
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
 |
 |
 |
|
|
|
|
 |
|
|
|
|
|
|
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
Ah, yes.
We did a little bit of this before,
didn't we,
about the
command prompt and the
console.
The one where you operate
the computer via text,
by typing characters on a
black screen.
It's to do with that.
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
 |
 |
 |
|
|
|
|
 |
|
|
|
|
|
 |
|
 |
Command Prompt
|
If you have a Windows OS,
this is in Program -> Accessories
for all of them. |
|
|
|
|
|
|
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
 |
 |
|
Ahh, we looked at this
when we did
GUI and CUI and all that,
right?
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
That's right.That's called
"standard input/output".
In the old days, computers
were quite weak, so
it was standard for the OS
to be a screen with just text.
So it's because input and
output were done with that.
You could say that calling it
this is a remnant from that era.
This output window is the
same feature as the
console
standard output.
It is built-in to the IDE. |
|
|
 |
 |
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
|
|
|
|
|
 |
There's no need to use
a separate console.
IDEs are so useful. |
|
|
|
|
|
|
|
|
|