<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Apparently when using Alice 2.4.2 to <span>create a new function</span>, one is not allowed to return anything except a number <span>nor change the pre-coded return 1 to return <number variable></span> nor use and of the constructs at the bottom of the edit
 window, if/else, loop, while, etc., nor drag a non-numeric variable down into the edit window</p>
<p><br>
</p>
<p>In other words, the create new function button is broken.</p>
<p><br>
</p>
<p>What i am trying to do is set up an Alice 2 world to replace the pseudo code currently being used in the CIS 120 "Intro to computers" class at the local college.  I think it would be a lot more helpful of the student's understanding of they could actually
 see the results of the code they write. <br>
</p>
<p></p>
<div>
<blockquote>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
line-height:normal">
<b><span style="font-size:12.0pt;font-family:"Times New Roman",serif;
mso-fareast-font-family:"Times New Roman"">Scenario:</span></b><span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-font-family:
"Times New Roman""> A robot is sitting
 in a chair with its arms down. Write an algorithm, using pseudo-code, to make the robot:</span></p>
<ul type="disc">
<li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
     line-height:normal;mso-list:l0 level1 lfo1;tab-stops:list .5in">
<span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-font-family:
     "Times New Roman"">stand up</span></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
     line-height:normal;mso-list:l0 level1 lfo1;tab-stops:list .5in">
<span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-font-family:
     "Times New Roman"">walk until it senses a wall</span></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
     line-height:normal;mso-list:l0 level1 lfo1;tab-stops:list .5in">
<span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-font-family:
     "Times New Roman"">turn around</span></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
     line-height:normal;mso-list:l0 level1 lfo1;tab-stops:list .5in">
<span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-font-family:
     "Times New Roman"">walk back to the chair</span></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
     line-height:normal;mso-list:l0 level1 lfo1;tab-stops:list .5in">
<span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-font-family:
     "Times New Roman"">sit back down in the origin starting position</span></li></ul>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
line-height:normal">
<span style="font-size:12.0pt;font-family:"Times New Roman",serif;
mso-fareast-font-family:"Times New Roman"">Finally, output the total number of steps taken.</span></p>
</blockquote>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
line-height:normal">
</p>
<div>
<blockquote>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
line-height:normal">
<b><span style="font-size:12.0pt;font-family:"Times New Roman",serif;
mso-fareast-font-family:"Times New Roman"">Commands:</span></b><span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-font-family:
"Times New Roman""></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
line-height:normal">
<span style="font-size:12.0pt;font-family:"Times New Roman",serif;
mso-fareast-font-family:"Times New Roman"">In addition to our standard pseudo code commands, you must also use the following robot control commands:</span></p>
<ul type="disc">
<li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
     line-height:normal;mso-list:l0 level1 lfo1;tab-stops:list .5in">
<span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-font-family:
     "Times New Roman"">sit</span></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
     line-height:normal;mso-list:l0 level1 lfo1;tab-stops:list .5in">
<span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-font-family:
     "Times New Roman"">stand</span></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
     line-height:normal;mso-list:l0 level1 lfo1;tab-stops:list .5in">
<span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-font-family:
     "Times New Roman"">step (one step forward)</span></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
     line-height:normal;mso-list:l0 level1 lfo1;tab-stops:list .5in">
<span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-font-family:
     "Times New Roman"">raise arms (parallel to floor)</span></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
     line-height:normal;mso-list:l0 level1 lfo1;tab-stops:list .5in">
<span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-font-family:
     "Times New Roman"">lower arms (pointing to floor)</span></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
     line-height:normal;mso-list:l0 level1 lfo1;tab-stops:list .5in">
<span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-font-family:
     "Times New Roman"">sense (only if arms are raised) returns a Boolean value. TRUE if at the wall.</span></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
     line-height:normal;mso-list:l0 level1 lfo1;tab-stops:list .5in">
<span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-font-family:
     "Times New Roman"">turn (90 degrees right)</span></li></ul>
</blockquote>
</div>
I have easily implemented all of the commands "bunny sit", bunny stand", "bunny step", etc. but ran into a major SNAFU when I tried to implement the "sense" command. I could just have them use a primitive function: "bunny is within threshold of object but I
 wanted to preserve the existing set of commands as much as possible.<br>
<p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
line-height:normal">
<br>
<span style="font-size:12.0pt;font-family:"Times New Roman",serif;
mso-fareast-font-family:"Times New Roman""></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
line-height:normal">
<span style="font-size:12.0pt;font-family:"Times New Roman",serif;
mso-fareast-font-family:"Times New Roman"">It would be real helpful if the Alice maintenance team could fix Alice 2 create function capability and add the ability to return a Boolean variable.<br>
</span></p>
</div>
<br>
<p></p>
</div>
</body>
</html>