alice-teacher Do in order scope issue in Alice 3

Leonel Morales litomd at gmail.com
Wed May 18 13:33:52 EDT 2022


I guess it has to do with blocks' translation into Java. Do in order
translation places all instructions inside curly brackets creating a
semantic scope.

I examined the code with the "Java code on the side" option and obtained
this:

[image: image.png]

And it works... not sure if it should.

Regards,

El mié, 18 may 2022 a las 10:43, Carlos Bovell via alice-teachers (<
alice-teachers at lists.andrew.cmu.edu>) escribió:

> Hi,
>
> In Alice 3, the do in order control structure limits scope. Is there a
> reason for that? In the attached screenshot, the variable outside the do in
> order can't be assigned any of the variables' values that were declared
> inside the do in order.
>
> Carlos
>
>
> _______________________________________________
> alice-teachers mailing list
> alice-teachers at lists.andrew.cmu.edu
> To change settings or unsubscribe visit:
> https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20220518/90626c13/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 142318 bytes
Desc: not available
URL: <http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20220518/90626c13/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 186852 bytes
Desc: not available
URL: <http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20220518/90626c13/attachment-0003.png>


More information about the alice-teachers mailing list