On Sep 30, 12:18 pm, Charlie-Boo <shymath...@[EMAIL PROTECTED]
> wrote:
> I have a variable X with an existing value which I would like to set
> to any value I want, via READ, potentially changing it. I would like:
>
> A. If no change to X is desired, then a short input results in X
> ending up with the same value it started with.
> B. The short input mentioned in A is independent of the value of X.
> C. We are able to change X to any string we want.
> D. There is only one execution of a READ.
>
> I believe that every instance of this problem that I have seen
> violated C: we are not able to change X to the short input mentioned
> in A and B.
>
> 1. Adhere to C.
> 2. Prove whether we can adhere to all 4.
>
> C -
X, of course has the value you want to keep if no change! The question
is, how do you determine, or what are the rules to determine a "no
change to X is desired"?. Essentially a <return> implies no change!, a
blank is a change? correct? so, a return will yield a null value.
S Y=X R !,"ENTER: ",X I X="" S X=Y


|