Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Big Problem Please Help

Mar
2
0
Sorry if it's hard to follow it's 2:30 and I've been working for about 30 Hours on the program and just got snagged about 30 mins ago on this.

I am currently in the progress of creating a program that will monitor the ins and outs of golf carts. for instance. When a cart is givin out I will enter the cart number and enter a 1 for out or 0 if it comes in. I also have it set so I can view the status of all the carts at one time. Here is the coding.
To set up the table I used the Set /U C1=0
Set /U C2=0
etc...
To edit I used ESET /U C1=0 and edit accordingly to out 1 or in 0

To display I have it set at
If %C1 = 0 echo Available
If %C1 = 1 echo In Use

Now the problem I have is; when I run to view the list. Lets say I change C1 to 1 so it is in use. When I pull up the display it still says 0 until I exit the whole program and start again. Then it changes.

My question is what do I need to do to update without exiting?
Clear Ram? etc... or A code.
 
Why "/U"? That puts the variable into the registry. How about just plain ESET
C1 (or SET C1). That puts the variable into the current environment, which is
readily available to to the program.

On Fri, 05 Mar 2010 02:25:18 -0500, Roxide <> wrote:

|Sorry if it's hard to follow it's 2:30 and I've been working for about 30 Hours on the program and just got snagged about 30 mins ago on this.
|
|I am currently in the progress of creating a program that will monitor the ins and outs of golf carts. for instance. When a cart is givin out I will enter the cart number and enter a 1 for out or 0 if it comes in. I also have it set so I can view the status of all the carts at one time. Here is the coding.
|To set up the table I used the Set /U C1=0
| Set /U C2=0
| etc...
|To edit I used ESET /U C1=0 and edit accordingly to out 1 or in 0
|
|To display I have it set at
|If %C1 = 0 echo Available
|If %C1 = 1 echo In Use
|
|Now the problem I have is; when I run to view the list. Lets say I change C1 to 1 so it is in use. When I pull up the display it still says 0 until I exit the whole program and start again. Then it changes.
|
|My question is what do I need to do to update without exiting?
|Clear Ram? etc... or A code.
|
|
|
|
--
- Vince
 
If your desire is to persist the status in the registry, then using /U
makes sense. Just add the /E switch as well and your current environment
will also be updated.

If the data does not need to be persisted, then just use SET without any
switches.

-Scott

vefatica <> wrote on 03/05/2010 09:28:55 AM:


> Why "/U"? That puts the variable into the registry. How about
justplain ESET

> C1 (or SET C1). That puts the variable into the current environment,
which is

> readily available to to the program.
>
> On Fri, 05 Mar 2010 02:25:18 -0500, Roxide <> wrote:
>
> |Sorry if it's hard to follow it's 2:30 and I've been working for
> about 30 Hours on the program and just got snagged about 30 mins ago on
this.

> |
> |I am currently in the progress of creating a program that will
> monitor the ins and outs of golf carts. for instance. When a cart is
> givin out I will enter the cart number and enter a 1 for out or 0 if
> it comes in. I also have it set so I can view the status of all the
> carts at one time. Here is the coding.
> |To set up the table I used the Set /U C1=0
> | Set /U C2=0
> | etc...
> |To edit I used ESET /U C1=0 and edit accordingly to out 1 or in 0
> |
> |To display I have it set at
> |If %C1 = 0 echo Available
> |If %C1 = 1 echo In Use
> |
> |Now the problem I have is; when I run to view the list. Lets say I
> change C1 to 1 so it is in use. When I pull up the display it still
> says 0 until I exit the whole program and start again. Then it changes.
> |
> |My question is what do I need to do to update without exiting?
> |Clear Ram? etc... or A code.
> |
> |
> |
> |
> --
> - Vince
>
>
>
>
 

Similar threads

Back
Top