Import LinuxCNC source tree

This commit is contained in:
Wang Dequan
2026-08-20 06:17:39 +08:00
commit 2c814634c3
9429 changed files with 10556013 additions and 0 deletions

29
nc_files/retval.ngc Normal file
View File

@@ -0,0 +1,29 @@
; demonstrate optional return values from endsub and return
o1000 sub
o1010 if [#1 GT 0]
o1010 return [123*[#1]]
o1010 endif
o1020 if [#1 LT 0]
o1020 return
o1020 endif
o1000 endsub [4712]
o1000 call [0]
(debug,call with arg1=0 return #<_value>)
; #<_value> is 4712.0
o1000 call [2]
(debug,call with arg1=2 return #<_value>)
; #<_value> is 246.0
o1000 call [-1]
(debug,call with arg1=-1 return #<_value>)
; #<_value> is 0.0
m2