Skip to content

Commit d19aa78

Browse files
committed
Web demo
1 parent 706b8c4 commit d19aa78

File tree

3 files changed

+85
-0
lines changed

3 files changed

+85
-0
lines changed

drawWeb.html

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>FlowgorithmJS offline</title>
5+
<meta charset="utf-8">
6+
<script src="lib/jquery-3.3.1.min.js"></script>
7+
<script src="flowgorithm.js?013"></script>
8+
<script>
9+
var config = {
10+
itMode: 2
11+
};
12+
var url1 = 'https://andreaval.github.io/FlowgorithmJS/fprg/max3numbers.fprg';
13+
var url2 = 'https://andreaval.github.io/FlowgorithmJS/fprg/next.fprg';
14+
$(function(){
15+
drawFlowchartFromUrl(url1,'#f1',config);
16+
drawFlowchartFromUrl(url2,'#f2',config);
17+
});
18+
</script>
19+
<style>
20+
h1{font-size:1.2em}
21+
div.f{width:49%;float:left}
22+
</style>
23+
</head>
24+
<body>
25+
<h1>FlowgorithmJS - Example of use</h1>
26+
<div id="f1" class="f"></div>
27+
<div id="f2" class="f"></div>
28+
</body>
29+
</html>

fprg/max3numbers.fprg

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?xml version="1.0"?>
2+
<flowgorithm fileversion="2.11">
3+
<attributes>
4+
<attribute name="name" value="Maximum of 3 numbers"/>
5+
<attribute name="authors" value="Andrea Vallorani"/>
6+
<attribute name="about" value="Calc the maximum of 3 numbers"/>
7+
<attribute name="saved" value="2019-02-17 04.55.01 "/>
8+
<attribute name="created" value="YV92YWxsb3Jhbmk7bGludXgtc2VydmVyOzIwMTgtMTAtMjA7MTA6MzY6MjQgQU07MzY4Nw=="/>
9+
<attribute name="edited" value="YV92YWxsb3Jhbmk7bGludXgtc2VydmVyOzIwMTgtMTAtMjA7MTI6MTQ6NDQgUE07MTszODEw"/>
10+
<attribute name="edited" value="YW5kcmU7REVTS1RPUC1TNFFIVENJOzIwMTktMDItMTc7IjA0LjU1LjAxICI7MTsyODkz"/>
11+
</attributes>
12+
<function name="Main" type="None" variable="">
13+
<parameters/>
14+
<body>
15+
<declare name="N1, N2, N3, MAX" type="Real" array="False" size=""/>
16+
<input variable="N1"/>
17+
<input variable="N2"/>
18+
<input variable="N3"/>
19+
<if expression="N1&gt;N2">
20+
<then>
21+
<assign variable="MAX" expression="N1"/>
22+
</then>
23+
<else>
24+
<assign variable="MAX" expression="N2"/>
25+
</else>
26+
</if>
27+
<if expression="N3&gt;MAX">
28+
<then>
29+
<assign variable="MAX" expression="N3"/>
30+
</then>
31+
<else/>
32+
</if>
33+
<output expression="MAX" newline="True"/>
34+
</body>
35+
</function>
36+
</flowgorithm>

fprg/next.fprg

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0"?>
2+
<flowgorithm fileversion="2.11">
3+
<attributes>
4+
<attribute name="name" value="Next number"/>
5+
<attribute name="authors" value="Andrea Vallorani"/>
6+
<attribute name="about" value="Print the next of a given number"/>
7+
<attribute name="saved" value="2019-02-17 04.28.45 "/>
8+
<attribute name="created" value="YW5kcmU7REVTS1RPUC1TNFFIVENJOzIwMTktMDItMTc7IjA0LjI4LjI4ICI7Mjc5NA=="/>
9+
<attribute name="edited" value="YW5kcmU7REVTS1RPUC1TNFFIVENJOzIwMTktMDItMTc7IjA0LjI4LjQ1ICI7MTsyOTAx"/>
10+
</attributes>
11+
<function name="Main" type="None" variable="">
12+
<parameters/>
13+
<body>
14+
<declare name="N, NEXT" type="Integer" array="False" size=""/>
15+
<input variable="N"/>
16+
<assign variable="NEXT" expression="N+1"/>
17+
<output expression="&quot;Next is &quot; &amp; NEXT" newline="True"/>
18+
</body>
19+
</function>
20+
</flowgorithm>

0 commit comments

Comments
 (0)