Infant Script File
Files ending in .infant
are Infant scripts.
Get started by creating a new file ending with .infant
.
Or try Infant Lang immediately with the Playground.
Create a new fileβ
Open your favorite text editor and in the file name, type hello.infant
.
Or use the PowerShell to create a new file:
New-Item -Path 'C:\Users\user\Desktop\hello.infant' - ItemType File
tip
Install the Visual Studio Code editor and install the Infant Lang Extension to edit Infant Scripts files more easily with syntax highlighting and code completion.
Print MEOW
with Infant Langβ
In the hello.infant
file, paste the following code:
# Moving Pointer to 77
for 77 move pointer right
# Setting Memory as Pointer + 2
memory = pointer + 2
print char pointer # Will Print M
# Moving pointer left 8 to Point 69
move pointer left 8
print char pointer # Will Print E
print char memory # Will Print O
# Setting Memory to 87
memory = 87
if memory == 87 print char memory
Save the file and it is ready to run.
Run the fileβ
caution
The Windows default console host (conhost.exe
) π does not support printing Unicode characters π. However, the new Windows Terminal does π₯³. Use Windows Terminal or the Integrated Terminal of Visual Studio Code which has full Unicode support to run the Infant Script πΆπ
To run the file, type the following command:
infant hello.infant
Check the outputβ
MEOW
Congratulations! πβ
You successfully created a new file π€, wrote an Infant script π₯, and executed it πββοΈ.
Let's learn more about Infant Lang!