Jonathanpb (talk | contribs) m (Removed the Blocks template.) |
Jonathanpb (talk | contribs) (Revised the article.) |
||
Line 1: | Line 1: | ||
{{Block | {{Block | ||
− | |name = Join () () | + | |name = Join ()() |
− | |image = File: | + | |image = File:Join_()().png |
− | |imagewidth = | + | |imagewidth = 57px |
− | |category = [[Operators Blocks|Operators | + | |category = [[Operators Blocks|Operators]] |
− | |type = [[Reporter Block]] | + | |type = [[Reporter Block|Reporter]] |
}} | }} | ||
− | The '''Join ()()''' | + | The '''Join ()()''' [[Blocks|block]] is an [[Operators Blocks|Operators block]] and a [[Reporter Block|Reporter block]]. The block 'sticks' the two values together and reports the result - for example, if "hello" and "world" were put in the block, it would report "helloworld". |
− | |||
==Common Uses== | ==Common Uses== | ||
− | + | If words, numbers, sentences - any two values - must be stuck together, this block easily does the job. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Some common uses for the '''Join ()()''' block: | |
− | + | *Sticking together words and variables to create a sentence | |
− | + | [[File:Hello (answer).gif]] | |
+ | *Place a [[variable]] in a message (eg. "You completed '''2''' loops") | ||
+ | *An easy method of making a positive number turn negative (placing "-" in the first input and the positive number in the second) | ||
+ | ==Offline Decimal Trick== | ||
+ | Offline, numbers in variables and speech bubbles usually round to only two decimal places. In some [[Project|projects]], it is necessary to have more. Placing the calculation in one input of the '''Join ()()''' block and leaving the other input empty 'magically' reports the number with more decimal places. | ||
+ | *The original script: | ||
[[File:No join.gif]] | [[File:No join.gif]] | ||
− | + | *Script with more decimals: | |
− | Script with more decimals: | ||
− | |||
[[File:Join Trick.gif]] | [[File:Join Trick.gif]] | ||
− | + | *To set the number of decimal places, use a script like this: | |
− | To set the number of decimal places, use a script like this: | ||
[[File: Set Decimal places.gif|550px]] | [[File: Set Decimal places.gif|550px]] | ||
− | |||
{{Operators Blocks}} | {{Operators Blocks}} | ||
[[Category:Operators Blocks]] | [[Category:Operators Blocks]] |
Revision as of 08:32, 12 July 2010
Join ()() | |
![]() | |
Category | Operators |
Type | Reporter |
The Join ()() block is an Operators block and a Reporter block. The block 'sticks' the two values together and reports the result - for example, if "hello" and "world" were put in the block, it would report "helloworld".
Common Uses
If words, numbers, sentences - any two values - must be stuck together, this block easily does the job.
Some common uses for the Join ()() block:
- Sticking together words and variables to create a sentence
- Place a variable in a message (eg. "You completed 2 loops")
- An easy method of making a positive number turn negative (placing "-" in the first input and the positive number in the second)
Offline Decimal Trick
Offline, numbers in variables and speech bubbles usually round to only two decimal places. In some projects, it is necessary to have more. Placing the calculation in one input of the Join ()() block and leaving the other input empty 'magically' reports the number with more decimal places.
- The original script:
- Script with more decimals:
- To set the number of decimal places, use a script like this:
() + () • () - () • () * () • () / () • Pick Random () to () • () < () • () = () • () > () • () and () • () or () • Not () • Join ()() • Letter () of () • Length of () • () Mod () • Round () • () of ()More blocks...
|