This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#26 2012-01-06 18:47:20

ohaiderstudios
Scratcher
Registered: 2010-10-31
Posts: 100+

Re: Pascal Topic

slinger wrote:

Opps, approximately what do you know already? I'll start from there  tongue

Lol about that much  big_smile
(write, writeln, readln)

So variables would be a good place to start.


Fork Clamor on GitHub!

Offline

 

#27 2012-01-07 07:45:21

slinger
Scratcher
Registered: 2011-06-21
Posts: 1000+

Re: Pascal Topic

Ok great! I'll make one soon  smile


http://s0.bcbits.com/img/buttons/bandcamp_130x27_blue.png

Offline

 

#28 2012-01-07 11:49:20

ohaiderstudios
Scratcher
Registered: 2010-10-31
Posts: 100+

Re: Pascal Topic

slinger wrote:

Ok great! I'll make one soon  smile

Cool!  big_smile


Fork Clamor on GitHub!

Offline

 

#29 2012-01-07 12:45:50

slinger
Scratcher
Registered: 2011-06-21
Posts: 1000+

Re: Pascal Topic

Pascal Tutorial #2
---

This is my second pascal tutorial on variables.
To enter variables you must type

Code:

var
yourVariableHere: Integer; ~ a number
anotherVariable: string; ~ a word or text
andTheLastOne: boolean; ~ true or false

begin
   yourCodeHere;
end;

There are many more types of variables but those are the most commonly used.

---
next: if statements  big_smile



Edit: these are great tutorials.

Last edited by slinger (2012-01-07 12:48:36)


http://s0.bcbits.com/img/buttons/bandcamp_130x27_blue.png

Offline

 

#30 2012-01-08 12:48:40

slinger
Scratcher
Registered: 2011-06-21
Posts: 1000+

Re: Pascal Topic

Bump


http://s0.bcbits.com/img/buttons/bandcamp_130x27_blue.png

Offline

 

#31 2012-01-08 20:04:51

ohaiderstudios
Scratcher
Registered: 2010-10-31
Posts: 100+

Re: Pascal Topic

Great! The videos you linked to were the ones that I used to get introduced to Pascal and Lazarus. Another thing that would be nice for you to cover are arrays.


Fork Clamor on GitHub!

Offline

 

#32 2012-01-09 03:01:51

slinger
Scratcher
Registered: 2011-06-21
Posts: 1000+

Re: Pascal Topic

Yeah I'll cover arrays in the next one then ifs after.  big_smile


http://s0.bcbits.com/img/buttons/bandcamp_130x27_blue.png

Offline

 

#33 2012-01-10 10:42:13

slinger
Scratcher
Registered: 2011-06-21
Posts: 1000+

Re: Pascal Topic

Pascal tutorial #3
---

In this third tutorial I will explain how to use and define arrays.

Defining an array is very similar to defining a variable.
you type

Code:

var
  list:array[1..5]of string; // this is a comment :)

let's break it down.
list ~ name of the array
array ~ defining that it is an array
[1..5] ~ the array can go from the number one to 5
of string ~ the type of array.

To fill an array you simple enter this code

Code:

 list[1] := 'this is item #1';

Lets's break that down
list ~ name of the array
[1] ~ the location where you are storing the value.

now to reading arrays (this can also be done with variables).

Code:

writeln(list[1]);

This will store write out the first value of the array.

---

next : loops
if statements will come after :3


http://s0.bcbits.com/img/buttons/bandcamp_130x27_blue.png

Offline

 

#34 2012-01-11 13:25:23

slinger
Scratcher
Registered: 2011-06-21
Posts: 1000+

Re: Pascal Topic

Bump!


http://s0.bcbits.com/img/buttons/bandcamp_130x27_blue.png

Offline

 

#35 2012-01-11 13:57:36

poopo
Scratcher
Registered: 2009-09-20
Posts: 1000+

Re: Pascal Topic

Functions would be nice for you next tutorial.  smile


http://i45.tinypic.com/28rnqki.jpg

Offline

 

#36 2012-01-11 14:02:30

slinger
Scratcher
Registered: 2011-06-21
Posts: 1000+

Re: Pascal Topic

poopo wrote:

Functions would be nice for you next tutorial.  smile

Yeah sure! I'll do that soon  big_smile


http://s0.bcbits.com/img/buttons/bandcamp_130x27_blue.png

Offline

 

#37 2012-01-14 13:29:56

slinger
Scratcher
Registered: 2011-06-21
Posts: 1000+

Re: Pascal Topic

Pascal Tutorial #4
---

This tutorial is on if statements.

If statements are used for testing whether something in a program.
For example if i am hungry then I will eat an apple else I will not eat an apple.

To write a if statement you type

Code:

if condition then
  begin
    your code here;
  end;

to write an if else statement you alter the code so that at the end of the first test there is no ; to indicate an ending.

Code:

if condition then
  begin
    your code here;
  end
  
  else
    begin
        your code here;
     end;

to write an if and else if tester you use this

Code:

 if condition then
begin
 code here;
end

else if condition then
begin
  code here;
end;

Well that would be testing in pascal.

---
next: loops
after that: procedures
and after that: functions ~ sorry poopo but i think it should be in order ;P


http://s0.bcbits.com/img/buttons/bandcamp_130x27_blue.png

Offline

 

#38 2012-01-16 13:37:37

slinger
Scratcher
Registered: 2011-06-21
Posts: 1000+

Re: Pascal Topic

bump


http://s0.bcbits.com/img/buttons/bandcamp_130x27_blue.png

Offline

 

#39 2012-01-16 16:06:11

samtwheels
Scratcher
Registered: 2011-03-20
Posts: 1000+

Re: Pascal Topic

I'm learning pascal, i use lazarus too.

Offline

 

#40 2012-01-17 01:22:14

slinger
Scratcher
Registered: 2011-06-21
Posts: 1000+

Re: Pascal Topic

samtwheels wrote:

I'm learning pascal, i use lazarus too.

Sweet!  big_smile


http://s0.bcbits.com/img/buttons/bandcamp_130x27_blue.png

Offline

 

#41 2012-01-17 01:45:15

JJROCKER
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Pascal Topic

Pascal was a cool guy. He made a principal.


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://img255.imageshack.us/img255/3491/signature1y.jpg&link2=http://img577.imageshack.us/img577/5272/signature1sx.jpg&link3=http://img4.imageshack.us/img4/8514/signature1et.jpg&link4=http://i.imgur.com/POEpQyZ.png&link5=http://img163.imageshack.us/img163/4640/jjrockerfinal.jpg

Offline

 

#42 2012-01-17 03:03:00

slinger
Scratcher
Registered: 2011-06-21
Posts: 1000+

Re: Pascal Topic

JJROCKER wrote:

Pascal was a cool guy. He made a principal.

You mean Blaise Pascal? That's what this language was named after :p


http://s0.bcbits.com/img/buttons/bandcamp_130x27_blue.png

Offline

 

#43 2012-01-21 04:11:14

slinger
Scratcher
Registered: 2011-06-21
Posts: 1000+

Re: Pascal Topic

Bump


http://s0.bcbits.com/img/buttons/bandcamp_130x27_blue.png

Offline

 

#44 2012-02-23 07:48:55

slinger
Scratcher
Registered: 2011-06-21
Posts: 1000+

Re: Pascal Topic

Bumping :3
@mod-who-moved-this thanks  big_smile
edit: i'll do functions and procedures like really soon, today hopefully :3

Last edited by slinger (2012-02-23 07:51:28)


http://s0.bcbits.com/img/buttons/bandcamp_130x27_blue.png

Offline

 

#45 2012-02-23 07:51:39

LiFaytheGoblin
Scratcher
Registered: 2011-11-14
Posts: 1000+

Re: Pascal Topic

we have lazarus at school, but "computer science" is only possible for the older students  sad

Offline

 

#46 2012-02-23 07:52:34

slinger
Scratcher
Registered: 2011-06-21
Posts: 1000+

Re: Pascal Topic

That sucks  hmm
You can still try learning though  smile


http://s0.bcbits.com/img/buttons/bandcamp_130x27_blue.png

Offline

 

#47 2012-02-23 07:54:09

LiFaytheGoblin
Scratcher
Registered: 2011-11-14
Posts: 1000+

Re: Pascal Topic

yeah... but it's not easy to learn it without help  sad

Offline

 

#48 2012-02-23 07:55:53

slinger
Scratcher
Registered: 2011-06-21
Posts: 1000+

Re: Pascal Topic

That's what this topic is here for  smile  Just look around i'll organize my tutorials so they are easy to find :3


http://s0.bcbits.com/img/buttons/bandcamp_130x27_blue.png

Offline

 

#49 2012-02-23 07:59:58

LiFaytheGoblin
Scratcher
Registered: 2011-11-14
Posts: 1000+

Offline

 

#50 2012-02-23 08:06:32

slinger
Scratcher
Registered: 2011-06-21
Posts: 1000+

Re: Pascal Topic

Thanks, I'm writing one right now so just wait a minute or so  big_smile


http://s0.bcbits.com/img/buttons/bandcamp_130x27_blue.png

Offline

 

Board footer