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

#1 2012-06-13 17:31:39

rubgarg
New Scratcher
Registered: 2012-06-13
Posts: 2

Functions library in scratch

Hello, my name is Ruben García, I'm from Manizales - Caldas - Colombia and I'm using Scratch since 1 year ago. I think that this programming language is wonderfull and is very complete and is supported by a good language as Squeak Smalltalk, but, I think that scratch needs a function library for mathemathic and Trigonometric functions, this can make scratch like a strong language.

I want to know if a new scratch version has this features or if I can to collaborate to create them, and how can i help to this.

Thanks

Offline

 

#2 2012-06-14 00:55:05

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: Functions library in scratch

try BYOB?
there you can define your own blocks  smile
otherwise you could try and modify scratch through the shift-click r thing

Offline

 

#3 2012-06-14 01:24:36

chanmanpartyman
Scratcher
Registered: 2011-05-30
Posts: 500+

Re: Functions library in scratch

You can calculate sine, cosine, tangent, arc sine, arc cosine, and arc tangent in Scratch.
Along with that, you can find absolute value, square root, log, ln, 10^x, and e^x.
The block looks like this:

([sqrt v] of (10))

Last edited by chanmanpartyman (2012-06-14 01:26:14)

Offline

 

#4 2012-06-14 05:33:29

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Functions library in scratch

chanmanpartyman wrote:

You can calculate sine, cosine, tangent, arc sine, arc cosine, and arc tangent in Scratch.
Along with that, you can find absolute value, square root, log, ln, 10^x, and e^x.
The block looks like this:

([sqrt v] of (10))

This is correct - Scratch has had basic trigonometric and other mathematical functions for several years now - just look for the block above in the Operators section. 

In addition, the last I heard, Scratch 2.0 will give users the ability to design custom blocks that perform arbitrary procedures.  The procedures will not have a return value, so they are not true functions, but a return value can be emulated using a global variable.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#5 2012-08-29 09:42:30

rubgarg
New Scratcher
Registered: 2012-06-13
Posts: 2

Re: Functions library in scratch

Thanks chanmanpartyman for your answer, I think that must to search so much before asking this.
Thanks.

Offline

 

Board footer