evaluating strings as blocks

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

evaluating strings as blocks

Joseph Alotta
Greetings,

For debuting purposes, I want to build a string with calculations and then evaluate it.

Something like:

string := ‘2 + 2 - 5’;

and then do:


string asBlock value => -1


How can I get this to work?


Sincerely,

Joe.


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: evaluating strings as blocks

Ron Teitelbaum
Hi Joe,

Have a look at Complier.  

Then try

Complier evaluate: '1+1'

All the best,

Ron Teitelbaum


From: Joseph Alotta
Sent: Monday, July 11, 2016 12:14 PM


Greetings,

For debuting purposes, I want to build a string with calculations and then evaluate it.

Something like:

string := ‘2 + 2 - 5’;

and then do:


string asBlock value => -1


How can I get this to work?


Sincerely,

Joe.


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: evaluating strings as blocks

David Mitchell-10
In reply to this post by Joseph Alotta
Look at Compiler

On Mon, Jul 11, 2016 at 11:13 AM Joseph Alotta <[hidden email]> wrote:
Greetings,

For debuting purposes, I want to build a string with calculations and then evaluate it.

Something like:

string := ‘2 + 2 - 5’;

and then do:


string asBlock value => -1


How can I get this to work?


Sincerely,

Joe.


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: evaluating strings as blocks

Joseph Alotta
thank you.


> On Jul 11, 2016, at 11:18 AM, David Mitchell-10 [via Smalltalk] <[hidden email]> wrote:
>
> Look at Compiler
>
> On Mon, Jul 11, 2016 at 11:13 AM Joseph Alotta <[hidden email]> wrote:
> Greetings,
>
> For debuting purposes, I want to build a string with calculations and then evaluate it.
>
> Something like:
>
> string := ‘2 + 2 - 5’;
>
> and then do:
>
>
> string asBlock value => -1
>
>
> How can I get this to work?
>
>
> Sincerely,
>
> Joe.
>
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
>
> If you reply to this email, your message will be added to the discussion below:
> http://forum.world.st/evaluating-strings-as-blocks-tp4906034p4906041.html
> To start a new topic under Squeak - Beginners, email [hidden email]
> To unsubscribe from Squeak - Beginners, click here.
> NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: evaluating strings as blocks

Joseph Alotta
In reply to this post by Ron Teitelbaum
thank you.



> On Jul 11, 2016, at 11:17 AM, Ron Teitelbaum [via Smalltalk] <[hidden email]> wrote:
>
> Hi Joe,
>
> Have a look at Complier.  
>
> Then try
>
> Complier evaluate: '1+1'
>
> All the best,
>
> Ron Teitelbaum
>
>
> From: Joseph Alotta
> Sent: Monday, July 11, 2016 12:14 PM
>
>
> Greetings,
>
> For debuting purposes, I want to build a string with calculations and then evaluate it.
>
> Something like:
>
> string := ‘2 + 2 - 5’;
>
> and then do:
>
>
> string asBlock value => -1
>
>
> How can I get this to work?
>
>
> Sincerely,
>
> Joe.
>
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
>
> If you reply to this email, your message will be added to the discussion below:
> http://forum.world.st/evaluating-strings-as-blocks-tp4906034p4906040.html
> To start a new topic under Squeak - Beginners, email [hidden email]
> To unsubscribe from Squeak - Beginners, click here.
> NAML

Loading...