Alice Community  

Go Back   Alice Community > General Discussion > The Lounge

Reply
 
Thread Tools Display Modes
ITSE-1429: Assignment 5
Old
Todd Thompson
Junior Member
 
Status: Offline
Posts: 12
Join Date: Jan 2012
Location: Mesquite, TX
Default ITSE-1429: Assignment 5 - 02-27-2012, 05:03 AM

Another fun assignment, this time dealing with If..Else statements. I got tripped up creating my first statement (I created the variable outside of the custom method) but I figured it out.

I also found out how to delete custom methods. I think you have to make sure that references to the method are deleted but when you're ready, just click and drag the method to the trash can at the top of the screen.

You can also copy stuff by dragging it to the clipboard in the top left corner and paste it by dragging it from the clipboard to where you want it to go.

That may seems really simple to those that already know it, but it is not covered in the tutorials or in the textbook.
Attached Files
File Type: a2w assign5.a2w (1.24 MB, 3 views)

Last edited by Todd Thompson; 02-27-2012 at 05:11 AM.
   
Reply With Quote
Old
groundhound
Junior Member
 
Status: Offline
Posts: 6
Join Date: Jan 2012
Default 02-27-2012, 03:11 PM

Hi Todd, great to hear you're enjoying the assignments! You're right about deleting custom methods, ALICE at least tries to keep your code as clean as possible and avoid loose ends, so it wants to make sure you don't have anything pointing to a method that doesn't exist. If I recall properly, it gives you similar grief if you delete a variable that is referenced elsewhere in your code.

I too was disappointed with the copy/paste options in ALICE. You can only copy one "group" at a time, which sometimes means you have to copy a good part of a program line-by-line. Puts a bit of pressure on you to make your code as modular as possible, but still feels wonkey. One workaround I found is to drop the lines you need to copy into a "do in order" statement, then copy/paste that "group" where you need it in the program. Since ALICE's normal method of thinking is "do in order", the statement should just serve as a box.

Glad to hear you're not having trouble with the concept of if/else! Local and Global variables can be a pain in the rump at first, but once you get the hang of them they are really powerful.
   
Reply With Quote
Old
Todd Thompson
Junior Member
 
Status: Offline
Posts: 12
Join Date: Jan 2012
Location: Mesquite, TX
Default 02-29-2012, 07:38 AM

Yeah, the difference between variables is why I had to find out how to delete things. Discovering the clipboard was just a happy accident that proved very useful.
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.