Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with constant - maybe
#1
   

I am attempting to "restock" my "to N7" conversions and have come across a bit of a puzzle in regards to "constant"

The error in line #10 seems to be objecting to "pr". If I change "pr" to the value of "pr", as in the previous constant, to 16 - "constant pr2 = 2 * 16" the error clears. Then the same error occurs for line #11 and 12. Keying in the actual value of "xmax" and "tl" clears the error.

Similar error for lines 14 and 15.

It looks like that constant does not like using or referring to a previous constant value.

Also, constant does not seem to like int(), in lines 14, 15 and 17.

Could there be an issue with 'constant' or perhaps I am doing this incorrectly... My money is on the latter... lol

J
Logic is the beginning of wisdom.
Reply
#2
(11-27-2023, 07:14 AM)johnno56 Wrote: I am attempting to "restock" my "to N7" conversions and have come across a bit of a puzzle in regards to "constant"

The error in line #10 seems to be objecting to "pr". If I change "pr" to the value of "pr", as in the previous constant, to 16 - "constant pr2 = 2 * 16" the error clears. Then the same error occurs for line #11 and 12. Keying in the actual value of "xmax" and "tl" clears the error.

Similar error for lines 14 and 15.

It looks like that constant does not like using or referring to a previous constant value.

Also, constant does not seem to like int(), in lines 14, 15 and 17.

Could there be an issue with 'constant' or perhaps I am doing this incorrectly... My money is on the latter... lol

J

Yes, I need to make some changes to how "constant" works, sorry. Can you use "visible" until I've fixed it?
Reply
#3
Apologies not necessary... I had just finished playing "Gargoyle Attack" and figured I would see how constant was used in that game... As, you had suggested as a work-around, 'visible' was used instead. I modified my listing accordingly... Lo and behold... all the errors disappeared....

Lesson learnt: Check the examples and documentation 'before' logging an issue... lol

Thank you for the assist... Much appreciated...

J
Logic is the beginning of wisdom.
Reply
#4
(11-27-2023, 09:43 AM)johnno56 Wrote: Apologies not necessary... I had just finished playing "Gargoyle Attack" and figured I would see how constant was used in that game... As, you had suggested as a work-around, 'visible' was used instead. I modified my listing accordingly... Lo and behold... all the errors disappeared....

Lesson learnt: Check the examples and documentation 'before' logging an issue... lol

Thank you for the assist... Much appreciated...

J

But it is an issue. I had a plan with "constant", that they should be evaluated at compile time, and therefor their expressions can't include function calls, other variables etc. But at some time I changed my mind and just let them be assign-once variables, but I never changed the limitations of the expressions.
Reply
#5
Cool... Understood. I feel as though I may have added to your work load prior to the next release. It is 'my' turn to apologize...

J
Logic is the beginning of wisdom.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)