You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
Robert,
have you tried writing a program to change that value?
Code:
%LoGre = 2
%LoGre = 1
PRINT %LoGre = 2
%LoGre = 2
is an equate which can only be set once in your program never to be changed. The program won't compile if you have a second assignment to the same equate.
Paul.
First question about writing a program to change the value? Yes. (Well, something else must have been wrong, and I am extremely sorry I did not preserve that routine to try it again.) I resolved it by not using the "%" and just searching the entire file to make sure I did not assign a new value to it.
Second comment. You are right. It does not compile! Which is good for me!
Robert,
have you tried writing a program to change that value?
Code:
%LoGre = 2
%LoGre = 1
PRINT %LoGre = 2
%LoGre = 2
is an equate which can only be set once in your program never to be changed. The program won't compile if you have a second assignment to the same equate.
I am attempting to define several variables at the beginning of a program that I do NOT want its value changed anywhere else in the program any time for any reason. In fact, I'd just as soon it give an error if its value changed.
Suppose I have: %LoGre = 2
And later by accident I change it to: If NameFail=0 then
LoGre=0
End if
I would be perfectly happy to have the program give me an error right then and there, and just come to an end. Can the variables be 'frozen' to certain values I give it?
Another way to look at it. If the value for "Pi" was 3.14159, most of us wouldn't want the program to change Pi somewhere unexpectedly.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Leave a comment: