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

#1 2011-04-15 11:23:23

Mathsman3141
New Scratcher
Registered: 2011-04-15
Posts: 1

what do these do?

Does anyone know what these functions do?

Scripts
operators tab,

join     hello world
letter   1   of   world
length of    world

Thanks! :-)

Offline

 

#2 2011-04-15 11:29:44

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: what do these do?

Join: Joins letters together, e.g. (join 'sometext' (somevariable) ) will appear as 'sometext' with what the somevariable reports.
Letter of: Reports the letter # of a word, e.g. (letter '1' of 'text') will appear as t .
Length: How many letters are in the word, e.g. (length of 'text') will report 4.

Offline

 

#3 2011-04-15 11:33:13

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: what do these do?

This isn't advanced, but:

Join will report the first value (hello) joinrd to the secon (world). So, Join 'H' and 'i' makes Hi.

Letter () of [] reports that letter of the input: Letter 1 of Hi is 'H', letter 2 of Hi is 'i'.

Length of [] reports the number of symbols in the input: Hi is 2 symbols long.


These are called the STRING blocks as the rectangular text boxes are called string inputs, and string itself means a bunch of combined symbols: 1062387refwdhljw, Hardmath123, etc.

Hope this is helpful  wink

EDIT: Outposted  tongue

Last edited by Hardmath123 (2011-04-15 11:34:53)


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#4 2011-04-15 11:40:14

puppetadventurer
Scratcher
Registered: 2011-02-20
Posts: 1000+

Re: what do these do?

oh man theres nothing left to say


3

Offline

 

Board footer