runtime erorr

35 views
Skip to first unread message

shadi94

unread,
Nov 15, 2025, 10:54:31 AM (3 days ago) Nov 15
to The Ring Programming Language


hallo mahmoud,

how can y be a member of class in this example?



o = new myclass

? o


class myclass

            x = y

Mahmoud Fayed

unread,
Nov 15, 2025, 11:06:19 AM (3 days ago) Nov 15
to The Ring Programming Language
Hello Shadi

The rule in the class region (after the class name) is (Any identifier which is not already defined will be defined as an attribute in the class)

So, we can write 
class point x y z
And all of these identifiers will become attributes 
using x y z means expr expr expr where expr --> identifier 

In the same context, Using (x = y)
means (identifier = expr) where expr --> identifier

Summary: writing code in the class region requires attention because of this rule.

Greetings,
Mahmoud

shadi94

unread,
Nov 15, 2025, 11:27:49 AM (3 days ago) Nov 15
to The Ring Programming Language
hallo Mahmoud,

Thanks for the explanation.
I am implementing a static code analyser for Ring, and I wanted to show it as an error.

Greetings,
Shadi

Mahmoud Fayed

unread,
Nov 15, 2025, 11:41:58 AM (3 days ago) Nov 15
to The Ring Programming Language
Hello Shadi

You are welcome :D

Nice project idea, when you expect that the project will be ready for other developers to check/try?

Greetings,
Mahmoud

Reply all
Reply to author
Forward
0 new messages