02-26-2025, 02:35 PM
click the image to zoom in
Code:
'====================================================================
'HELPME.N7
'- An attempt to make a simple syntax help/example
'- Run on windows system
'- Console mode only
'
'INSTRUCTIONS
'- Place this file in the same folder as NED.EXE
'- Compile and Run helpme.n7
'- Examples
' Help me : abs[ENTER] to see the example of absolute value
' Help me : ex3_loops[ENTER] to see the example of using loops
' Help me : dir help[ENTER] to see functions/commands in examples\help
' Help me : dir basic[ENTER] to see functions/commands in examples\basic
' Help me : exit[ENTER] to exit this HELPME.N7
'====================================================================
include "file.n7"
path = []
'Main Loop
do
write "Help me : ";temp=rln()
if lower(temp) = "exit" then end
if lower(temp) = "dir help" then system "dir examples\help\*.n7 /w"
if lower(temp) = "dir basic" then system "dir examples\basic\*.n7 /w"
path[1] = "examples/help/"+temp+".n7"
path[2] = "examples/basic/"+temp+".n7"
if ReadAllText(path[1])=unset and ReadAllText(path[2])=unset and
temp<>"dir help" and temp<>"dir basic" then
pln "Not found"
elseif temp <> "dir"
pln
if ReadAllText(path[1])<>unset then
pln ReadAllText(path[1])
else
pln ReadAllText(path[2])
endif
endif
pln "--------------------------------------"
system "pause"
system "cls"
loop