-
Notifications
You must be signed in to change notification settings - Fork 0
Hello World
cl4cnam edited this page Nov 18, 2023
·
5 revisions
Here, you'll learn how to make a simple "Hello, World!" program.
-
Make a new folder for your program and name it, say
helloWorldProgram. -
Make a new file in it and name it
helloWorld.html. -
Copy and paste these lines into it:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Hello World</title>
<link rel="shortcut icon" href="#">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/cl4cnam/funcSug@b3f8fb8eafcc4dac5a72d87018c743db42437226/lib.css">
</head>
<body>
<script src="https://cdn.jsdelivr.net/gh/cl4cnam/funcSug@b3f8fb8eafcc4dac5a72d87018c743db42437226/libStd.fg" type="application/funcsug"></script>
<script src="https://cdn.jsdelivr.net/gh/cl4cnam/funcSug@b3f8fb8eafcc4dac5a72d87018c743db42437226/libDOM.fg" type="application/funcsug"></script>
<script src="helloWorld.fg" type="application/funcsug"></script>
<script src="https://cdn.jsdelivr.net/gh/cl4cnam/funcSug@b3f8fb8eafcc4dac5a72d87018c743db42437226/parser.js"></script>
<script src="https://cdn.jsdelivr.net/gh/cl4cnam/funcSug@b3f8fb8eafcc4dac5a72d87018c743db42437226/parserPy.js"></script>
<script src="https://cdn.jsdelivr.net/gh/cl4cnam/funcSug@b3f8fb8eafcc4dac5a72d87018c743db42437226/interpreter.js"></script>
<script src="https://cdn.jsdelivr.net/gh/cl4cnam/funcSug@b3f8fb8eafcc4dac5a72d87018c743db42437226/DOMloader.js"></script>
</body>
</html>You'll write your program into helloWorld.fg
Note
You'll have to include at least all the lines in the body (except the one with helloWorld.fg) into all your FuncSug programs, that is:
<script src="https://cdn.jsdelivr.net/gh/cl4cnam/funcSug@b3f8fb8eafcc4dac5a72d87018c743db42437226/libStd.fg" type="application/funcsug"></script>
<script src="https://cdn.jsdelivr.net/gh/cl4cnam/funcSug@b3f8fb8eafcc4dac5a72d87018c743db42437226/libDOM.fg" type="application/funcsug"></script>
<script src="https://cdn.jsdelivr.net/gh/cl4cnam/funcSug@b3f8fb8eafcc4dac5a72d87018c743db42437226/parser.js"></script>
<script src="https://cdn.jsdelivr.net/gh/cl4cnam/funcSug@b3f8fb8eafcc4dac5a72d87018c743db42437226/parserPy.js"></script>
<script src="https://cdn.jsdelivr.net/gh/cl4cnam/funcSug@b3f8fb8eafcc4dac5a72d87018c743db42437226/interpreter.js"></script>
<script src="https://cdn.jsdelivr.net/gh/cl4cnam/funcSug@b3f8fb8eafcc4dac5a72d87018c743db42437226/DOMloader.js"></script>- Make a new file in the
helloWorldProgramfolder and name ithelloWorld.fg.
Write this line into helloWorld.fg:
displayNewMessage('Hello, World!')- Run the server
On Windows, open a "command line" and type this:
cd hereTypeThePathTohelloWorldProgramDirectory
py -m http.server 8000 --bind 127.0.0.1On Linux, type this:
cd hereTypeThePathTohelloWorldProgramDirectory
python3 -m http.server 8000 --bind 127.0.0.1- Run the page
Open a browser this url into a browser: http://127.0.0.1:8000/helloWorld.html
You should get something like this:

Note
Don't worry! You'll be able to change the style of the message.
FuncSug Documentation