Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Objects #15

Open
Coding-Cactus opened this issue Aug 7, 2022 · 0 comments
Open

Add Objects #15

Coding-Cactus opened this issue Aug 7, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Coding-Cactus
Copy link
Member

Coding-Cactus commented Aug 7, 2022

Example:

obj Cactus ==>
	pub #size var dec <~~ declare attribites
	pub #name con str
	pub #type con str
	pri #DoB  con dec
	
	pub meth new(name -str-, type -str-) ==>
		#name <-< name
		#type <-< type

		#size <-< 0
		#DoB  <-< Time:now <~~ built in object, no need for () on methods with no paramaters
	<==

	pub meth grow(amount -dec-) ==>
		#size <-+-< amount <~~ #size <-< #size + amount
	<==

	pub meth get_DoB =dec=>
		<-- #DoB
	<==
<==

spikey <-con Cactus-< Cactus::new("spikey", "barrel")

Cactus::new("spikey, "barrel") <~~ literal
@Coding-Cactus Coding-Cactus self-assigned this Aug 7, 2022
@Coding-Cactus Coding-Cactus modified the milestones: v0.9.0, v0.8.0 Aug 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant