[jawsscripts] Re: String Variables

  • From: "Mike" <mike_sharp@xxxxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Mon, 5 Jul 2010 21:21:25 +0100

Thanks Paul,

Made a function to clear the string variables I use.

--------------------------------------------------
From: "Paul Magill" <magills@xxxxxxxxxxx>
Sent: Monday, June 28, 2010 12:12 PM
To: <jawsscripts@xxxxxxxxxxxxx>
Subject: [jawsscripts] Re: String Variables

> Hi Mike,
>
> - essentially, each has to be cleared individually with its own LET
> statement.
>
> - a few notes to expand that:
>
> String variables declared globally, retain their last assigned values 
> until
> Jaws is closed/the system is shut down.
>
> Those declared locally, that is, with a VAR statement in a script or
> function, loose their values when that script or function is exited.
>
> If you are clearing a number of variables in different places in your 
> code,
> you may wish to create a function for just that purpose. That way, there
> will only be the one line calling the function, instead of a group of 
> lines
> at each point.
>
> In your sample below, you are assigning a single space to the variable. If
> this is just a typo in the email, then skip the next sentence, smile.   It
> is normal to clear a string variable by assigning a Nul string to it, that
> is :
> LET VariableName = "", with no space between the quotes.
>
> Just a by the way.  A key in an .INI file, can only hold a string of up to
> 255 characters in length.   Any characters beyond that are simply lost
> without notice.
>
> Regards,
> Paul from Aust
>
> ----- Original Message ----- 
> From: "Michael Sharp" <mike_sharp@xxxxxxxxxxxxx>
>
>
> Hi All,
>
> In the scripts I write I am doing a lot of data manipulation and because 
> of
> this I use many different string variables. Some of these are stored as 
> the
> variable for use and some are written to an ini file. What is the best way
> for me to ensure that all information held in a string variable is 
> cleared?
> If I am using for example 20 different variables do I have to let the
> variable equal " " for each one is there a command that erases all 
> variable
> from memory?
>
> Regards,
>
> Mike
>
> __________�
>
> View the list's information and change your settings at
> http://www.freelists.org/list/jawsscripts
>
> 
__________�

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

Other related posts: