P1nG Programming Language 1.3v
P1nG is a simple programming language built off of python 3.9 that allows you to create and manipulate variables, as well as perform basic mathematical operations and much much more
Commands
- ask: prompts the user for input and assigns the input to a variable. Syntax: variable=ask{What's your name}
- math: performs a mathematical operation and assigns the result to a variable. Syntax: variable=math{5+5}
- paste: prints the value of a variable or a string. Syntax: paste{Hello, {variable}.}
- end: exits the program. Syntax: end{!}
- read: allows you to read .json files. Syntax: /path/to/json=read{}
- write: allows you to write .json files. Syntax: /path/to/json=write{data, stuff, age}
- win: allows you to create an application window. Syntax: win{500x500}
- int: allows you to open a website. Syntax: int{https://www.google.com}
- wint: allows you to put text on a pre-existing application window. Syntax: wint{Text}
- wind: allows you to close the application windows. Syntax: wind{}
FAQ
- How do I set a variable without using the ask or math command? You can't, but instead of having to add up numbers you can just type:
- var=math{5} to set your variable to 5, it still uses the math command but it's much more intuitive.
- How do I use IF statements? You can't not in this version of P1nG 1.3v
- Is it possible write scripts and save and run them later? Not yet, currently P1nG is still in development and isn't ready for scripting just yet.
- How do I put text in an App window? You just have to use the wint command, it puts text on the screen using the default font Arial.
Syntax
- /path/to/file=command{data}
- file.json=command{data}
- variable=command{equation}
- variable=command{question}
- variable=command{data}
- command{text}
- command{text {variable}}
- command{{variable}}
- command{NUMxNUM}
- command{URL}
- command{}
Examples
- paste{hello} Response: hello
- variable=ask{How old are you?} Response: How old are you?
- paste{You're {variable} years old!} Response: You're 1 years old! (variable=1)
- variable=math{5*2} Response: [result of math operation]
- paste{{variable}} Response: 10
- end{!} Response: *Ends program*
- file.json=write{Name: John, LName: Doe, Age: 50} Response: Written successfully
- file.json=read{} Response: DATA: Name: John, LName: Doe, Age: 50
- win{500x500} Response: Creates 500x500 sized window
- int{https://www.google.com} Response: Opens up https://www.google.com in your default browser
- wint{Hello World} Response: Puts the text 'Hello World' on the screen
- wind{} Response: Closes app window
Download