add existing documentation

This commit is contained in:
2024-11-02 15:11:00 +00:00
parent d5c41cbbaa
commit ac92c5317e
9 changed files with 1066 additions and 0 deletions

29
doc/sample/Sum.im Executable file
View File

@@ -0,0 +1,29 @@
package net.doorstuck.test
cout put:'Finds the sum of a set of numbers.'
sum = 0
while true do
cout print:'Number (blank to finish): '
cout flush
input = ''
v = 0
cin get:input
if input == '' then
break
end
try
v = Int parse:input
catch (#err:number_format, err)
cout put:'{input} is not a valid number.'
continue
end
sum += v
end
cout put:'Sum: {sum}'