Home
Project Folders
Teacher Resources
Student Resources
How Do I?
Literacy
MWForum
Site Map
Search
Our Team

MWForum Message [Date Index] [Threads] [Authors] [Attachments] [Subscribe]

[Thread Prev] [Thread Next]

To: <mwforum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Startup and variables
From: "Jeff Knope" <jknope@xxxxxxxx>
Date: Fri, 06 May 2005 15:03:04 -0700

Traci asked, "Is there any way to store a vaiable to use later?

Daniel replied with "to ini" (for "initialize" I suspect) using makes to
assign values.  

One thing to be aware of is variables created with make do not survive the
current session.  That is, if you exit MicroWorlds, or even the current
Project, those assignments will not be there the next time you load the
program.  So, "ini" needs to be run again to recreate them.  The easy way to
do that is to place a call to "ini" in Startup.  That way it is automatic that
they are recreated each time the program is loaded.

There is also a variable type called projectvars that do survive the current
session.  I find them a little cumbersome to use, and prefer makes placed in
Startup.

--Jeff


  ----- Original Message ----- 
  From: Trimbach, Traci 
  To: mwforum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx 
  Sent: Friday, May 06, 2005 10:23 AM
  Subject: Startup and variables


  Two questions:



    1.. Is there any way for a program to draw a text box or hatch a turtle in
a startup procedure?  I don't want people to have to use the mouse and click
on buttons to make a program work. 


    2.. Is there any way to store a variable to use later?  For instance, if I
wanted the students to write a program that asks the user to order how many
hamburgers, fries and drinks they wanted and the program would take their
answers and calculate how much they owe based on the amount of items ordered
and include tax.  The computer would then output the amount owed to the
user. 


  Thanks for any help, 



  Traci Trimbach

  CSCMS computer teacher/tech coordinator

  • Previous by thread: RE: Startup and variables
  • Next by thread: Procedures & Mindstorms

  • To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.


    © copyright 2001 - 2008