mirror of
https://github.com/sam-astro/Z-Sharp.git
synced 2025-12-10 15:52:12 +00:00
Updated Home (markdown)
parent
e68f19c232
commit
4290827bac
64
Home.md
64
Home.md
@ -1,2 +1,64 @@
|
||||
# Welcome to the Z-Sharp wiki!
|
||||
Anyone can contribute to this wiki, so please feel free to correct any mistakes and add missing information!
|
||||
Anyone can contribute to this wiki, so please feel free to correct any mistakes and add missing information!
|
||||
Z# Programming Language
|
||||
Z# is a programming language that was designed to be simple and easy to learn for beginner programmers. It is a high-level, interpreted language that has syntax similar to Python and JavaScript. Z# was created with the goal of making programming accessible to a wider audience, without sacrificing power and expressiveness.
|
||||
|
||||
Features
|
||||
Simple syntax
|
||||
Easy to learn
|
||||
High-level
|
||||
Interpreted
|
||||
Supports dynamic typing
|
||||
Object-oriented programming (OOP) support
|
||||
Garbage collection
|
||||
Cross-platform
|
||||
Hello World Example
|
||||
Here is an example of a "Hello World" program in Z#:
|
||||
|
||||
lua
|
||||
Copy code
|
||||
output "Hello, World!";
|
||||
Data Types
|
||||
Z# supports several built-in data types:
|
||||
|
||||
string - a sequence of characters, enclosed in double quotes
|
||||
number - a numeric value
|
||||
boolean - a true/false value
|
||||
list - a collection of values, enclosed in square brackets and separated by commas
|
||||
Variables
|
||||
Variables in Z# are dynamically typed, meaning that the type of a variable is determined at runtime. Variables can be declared using the var keyword:
|
||||
|
||||
csharp
|
||||
Copy code
|
||||
var message = "Hello, World!";
|
||||
output message;
|
||||
Functions
|
||||
Functions in Z# are defined using the func keyword:
|
||||
|
||||
scss
|
||||
Copy code
|
||||
func addNumbers(a, b) {
|
||||
return a + b;
|
||||
}
|
||||
|
||||
output addNumbers(2, 3); // Output: 5
|
||||
Object-Oriented Programming (OOP)
|
||||
Z# supports object-oriented programming (OOP) with classes and objects. Here is an example of a class in Z#:
|
||||
|
||||
kotlin
|
||||
Copy code
|
||||
class Person {
|
||||
constructor(name, age) {
|
||||
this.name = name;
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
greet() {
|
||||
output "Hello, my name is " + this.name + " and I am " + this.age + " years old.";
|
||||
}
|
||||
}
|
||||
|
||||
var person = new Person("Alice", 30);
|
||||
person.greet(); // Output: "Hello, my name is Alice and I am 30 years old."
|
||||
Conclusion
|
||||
Z# is a simple and easy-to-learn programming language that can be a great option for beginner programmers. Its high-level syntax and dynamic typing make it easy to get started with, while its support for object-oriented programming and garbage collection provide more advanced features for more experienced programmers.
|
||||
Loading…
x
Reference in New Issue
Block a user