custom associated variable and built-in constant

5 views
Skip to first unread message

pirx

unread,
Mar 21, 2011, 9:16:38 AM3/21/11
to Atalan Programming Langugage
Hello!

When reading The Reference I came upon this part ("Limit constants"):

"It is possible to define custom associated variable with name of some
built-in constant.
It does not change the type of the variable. Built-in constant will be
unavailable."

I cannot understand this part. Could you please give an example?

It is absolutely NOT urgent and NOT important, I just would love to
have as good understanding of the language as possible.

Best regards,

pawel /pirx/ kalinowski

pirx

unread,
Mar 21, 2011, 9:43:45 AM3/21/11
to Atalan Programming Langugage
More Reference related questions in the same thread (not to
contaminate the board):

Section "Initialization":


:::::::::::::::::::::::::::::
disp:array(0..39,0..23) of byte
const a:array of byte = 3 times 112, disp, 0
;Array has dimension 0..6
:::::::::::::::::::::::::::::

Shouldn't it read:


:::::::::::::::::::::::::::::
disp:array(0..39,0..23) of byte
const a:array of byte = 3 times 112, disp, 0
;Array has dimension 0..5
:::::::::::::::::::::::::::::

112 112 112 <disp >disp 0

?

rudla

unread,
Mar 21, 2011, 12:57:06 PM3/21/11
to Atalan Programming Langugage
If you mean 3 times 112, that is actual working syntax in Atalan.

Rudla

rudla

unread,
Mar 21, 2011, 1:06:38 PM3/21/11
to Atalan Programming Langugage
When you have the example

x:13..100
min = x.min
max = x.max
"x:[min]..[max]"

prints "x:13..100"

On the other side:

x:13..100
const min:x = 25 ;We define associated constant
"x:[min]..[max]"

will print

"x:25..100"

Rudla

pirx

unread,
Mar 21, 2011, 4:45:44 PM3/21/11
to Atalan Programming Langugage
Hello,

Oh no, it is about a simpler detail:

;Array has dimension 0..6
or
;Array has dimension 0..5

I am trying to understand different aspects of the language and I
think it should be 0..5, not 0..6 as in the Reference.

rudla

unread,
Mar 21, 2011, 6:26:42 PM3/21/11
to Atalan Programming Langugage
Oh, you are right.
It should be 0..5, good spot.

Rudla
Reply all
Reply to author
Forward
0 new messages