Skip to content

Commit c89e559

Browse files
authored
Update README.md
1 parent bb2cc4f commit c89e559

File tree

1 file changed

+59
-59
lines changed

1 file changed

+59
-59
lines changed

README.md

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -7,65 +7,65 @@
77
[Windows](https://github.com/NikkyHika/Programming-Language-Language/releases/tag/v1.0.4)
88

99
# help();
10-
The LPL is just a simplified C++.
11-
namespace file
12-
|- `text file::fileGetContents(text file_path)` = reads text from a file.
13-
|- `void file::filePutContents(text file_path, text file_contents)` = writes text from a file.
14-
|- `void file::fileAddContents(text file_path, text append_contents)` = appends text to a file.
15-
namespace convert
16-
|- `text convert::number_to_text(number num)` = converts a number to text (123 -> "123").
17-
|- `number convert::text_to_number(text text)` = converts a text to number ("123" -> 123).
18-
|- `symbol convert::number_to_symbol(number num)` = converts a number to symbol by number code (97 -> 'a').
19-
|- `number convert::symbol_to_number(symbol sym)` = converts a symbol to number by symbol code ('a' -> 97).
20-
|- `text convert::symbol_to_text(symbol sym)` = converts a symbol to text ('a' -> "a").
21-
namespace os
22-
|- `text os::getPath()` = get current directory.
23-
|- `list<text> os::listDir()` = get list of directiores and files.
24-
|- `void os::deleteFile(text filename)` = deletes file.
25-
|- `void os::deleteFolder(text foldername)` = deletes directory.
26-
|- `void os::createFolder(text foldername)` = creates directory.
27-
|- `void os::changeDir(text foldername)` = creates directory.
28-
|- `void os::cmdCommand(text command)` = runs a command line command (IMPORTANT! The "cd" command does not work, use os.changeDir).
29-
|- `void os::sleep(number milliseconds)` = pauses the program for the specified number of milliseconds.
30-
|- `void os::shutdown()` = shutdowns the computer.
31-
|- `void os::reboot()` = reboots the computer.
32-
namespace ConsoleColor
33-
|- `ConsoleColor::BLACK` = 0
34-
|- `ConsoleColor::BLUE` = 1
35-
|- `ConsoleColor::GREEN` = 2
36-
|- `ConsoleColor::CYAN` = 3
37-
|- `ConsoleColor::RED` = 4
38-
|- `ConsoleColor::MAGENTA` = 5
39-
|- `ConsoleColor::BROWN` = 6
40-
|- `ConsoleColor::LIGHTGRAY` = 7
41-
|- `ConsoleColor::DARKGRAY` = 8
42-
|- `ConsoleColor::LIGHTBLUE` = 9
43-
|- `ConsoleColor::LIGHTGREEN` = 10
44-
|- `ConsoleColor::LIGHTCYAN` = 11
45-
|- `ConsoleColor::LIGHTRED` = 12
46-
|- `ConsoleColor::LIGHTMAGENTA` = 13
47-
|- `ConsoleColor::YELLOW` = 14
48-
|- `ConsoleColor::WHITE` = 15
49-
`text ask()` = accepts text entered by the user.
50-
`list<text> explode(symbol separator, text text)` = splits the text into list<text>.
51-
`void setConsoleColor(number textColor, number backgroundColor` = ConsoleColor.BLACK)` = changes the color of the console.
52-
`number getCharCode()` = waits for a key to be pressed and returns its code, just like _getch() does.
53-
`void help()` = prints a list of methods and keywords to the console.
54-
`number getElementIndex(list<typename> l, typename e)` = returns the index of an element in a list.
55-
`typename::iterator _Begin(typename& l)` = returns a list or text and etc. iterator, like typename.begin().
56-
`typename::iterator _End(typename& l)` = returns a list or text and etc. iterator, like typename.end().
57-
58-
-- 21 methods --
59-
60-
`display ?` = prints text to the console.
61-
`number` = a variable type that stores in 32-bit a number from -2147483644 to 2147483648 if you add unsigned in front of it, it will also be from 0 to 4294967295.
62-
`text` = a variable type that stores text, the text must be in double quotes ("Hello, world!").
63-
`symbol` = a variable type that contains a single character is protected by apostrophes ('a').
64-
`list<typename>` = a list of objects (variables), you can learn more about them as vector in C++: https://learn.microsoft.com/en-us/cpp/standard-library/vector-class?view=msvc-170 (IMPORTANT: do not use list<typename>.find(), list<typename>.begin() and list<typename>.end(), we recommend using a `number getElementIndex(list<typename> l, typename e)`, `typename::iterator _Begin(typename& l)` and `typename::iterator _End(typename& l)`).
65-
`begin` = opens a block of code.
66-
`end` = closes a block of code.
67-
68-
-- 7 keywords --
10+
The LPL is just a simplified C++.
11+
namespace file
12+
|- `text file::fileGetContents(text file_path)` = reads text from a file.
13+
|- `void file::filePutContents(text file_path, text file_contents)` = writes text from a file.
14+
|- `void file::fileAddContents(text file_path, text append_contents)` = appends text to a file.
15+
namespace convert
16+
|- `text convert::number_to_text(number num)` = converts a number to text (123 -> "123").
17+
|- `number convert::text_to_number(text text)` = converts a text to number ("123" -> 123).
18+
|- `symbol convert::number_to_symbol(number num)` = converts a number to symbol by number code (97 -> 'a').
19+
|- `number convert::symbol_to_number(symbol sym)` = converts a symbol to number by symbol code ('a' -> 97).
20+
|- `text convert::symbol_to_text(symbol sym)` = converts a symbol to text ('a' -> "a").
21+
namespace os
22+
|- `text os::getPath()` = get current directory.
23+
|- `list<text> os::listDir()` = get list of directiores and files.
24+
|- `void os::deleteFile(text filename)` = deletes file.
25+
|- `void os::deleteFolder(text foldername)` = deletes directory.
26+
|- `void os::createFolder(text foldername)` = creates directory.
27+
|- `void os::changeDir(text foldername)` = creates directory.
28+
|- `void os::cmdCommand(text command)` = runs a command line command (IMPORTANT! The "cd" command does not work, use os.changeDir).
29+
|- `void os::sleep(number milliseconds)` = pauses the program for the specified number of milliseconds.
30+
|- `void os::shutdown()` = shutdowns the computer.
31+
|- `void os::reboot()` = reboots the computer.
32+
namespace ConsoleColor
33+
|- `ConsoleColor::BLACK` = 0
34+
|- `ConsoleColor::BLUE` = 1
35+
|- `ConsoleColor::GREEN` = 2
36+
|- `ConsoleColor::CYAN` = 3
37+
|- `ConsoleColor::RED` = 4
38+
|- `ConsoleColor::MAGENTA` = 5
39+
|- `ConsoleColor::BROWN` = 6
40+
|- `ConsoleColor::LIGHTGRAY` = 7
41+
|- `ConsoleColor::DARKGRAY` = 8
42+
|- `ConsoleColor::LIGHTBLUE` = 9
43+
|- `ConsoleColor::LIGHTGREEN` = 10
44+
|- `ConsoleColor::LIGHTCYAN` = 11
45+
|- `ConsoleColor::LIGHTRED` = 12
46+
|- `ConsoleColor::LIGHTMAGENTA` = 13
47+
|- `ConsoleColor::YELLOW` = 14
48+
|- `ConsoleColor::WHITE` = 15
49+
`text ask()` = accepts text entered by the user.
50+
`list<text> explode(symbol separator, text text)` = splits the text into list<text>.
51+
`void setConsoleColor(number textColor, number backgroundColor = ConsoleColor.BLACK)` = changes the color of the console.
52+
`number getCharCode()` = waits for a key to be pressed and returns its code, just like _getch() does.
53+
`void help()` = prints a list of methods and keywords to the console.
54+
`number getElementIndex(list<typename> l, typename e)` = returns the index of an element in a list.
55+
`typename::iterator _Begin(typename& l)` = returns a list or text and etc. iterator, like typename.begin().
56+
`typename::iterator _End(typename& l)` = returns a list or text and etc. iterator, like typename.end().
57+
58+
-- 21 methods --
59+
60+
`display ?` = prints text to the console.
61+
`number` = a variable type that stores in 32-bit a number from -2147483644 to 2147483648 if you add unsigned in front of it, it will also be from 0 to 4294967295.
62+
`text` = a variable type that stores text, the text must be in double quotes ("Hello, world!").
63+
`symbol` = a variable type that contains a single character is protected by apostrophes ('a').
64+
`list<typename>` = a list of objects (variables), you can learn more about them as vector in C++: https://learn.microsoft.com/en-us/cpp/standard-library/vector-class?view=msvc-170 (IMPORTANT: do not use list<typename>.find(), list<typename>.begin() and list<typename>.end(), we recommend using a `number getElementIndex(list<typename> l, typename e)`, `typename::iterator _Begin(typename& l)` and `typename::iterator _End(typename& l)`).
65+
`begin` = opens a block of code.
66+
`end` = closes a block of code.
67+
68+
-- 7 keywords --
6969
```cpp
7070
number main() begin
7171
display "Hello, world!"

0 commit comments

Comments
 (0)