Switch from parentheses to angle brackets

`\(` is more likely to be a valid escape sequence in the
future (as is `\[`) and `\{` is already taken.
This commit is contained in:
Rangi
2021-04-20 10:02:39 -04:00
committed by Eldred Habert
parent b0f8d75d1d
commit fe3521c7a4
14 changed files with 53 additions and 53 deletions

View File

@@ -0,0 +1,19 @@
MACRO printargs
PRINTLN "first = \<1>"
FOR I, 2, _NARG
PRINTLN "next = \<{d:I}>"
ENDR
PRINTLN "last = \<{d:_NARG}>"
ENDM
printargs A, B, C, D
MACRO mac
println \<2__> + \<1_2> + \<\1>
x = 2
println \<{d:x}> + \<1_{d:x}> + \<\<\<13>>>
y equs "NARG"
println \<x> + \<1_{d:x}_> + \<\<\<_{y}>>>
ENDM
mac 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 1

View File

@@ -1 +1 @@
\()
\<>

View File

@@ -1,2 +1,2 @@
FATAL: invalid-empty-macro-arg.asm(1):
Empty parenthetic macro argument
Empty bracketed macro argument

View File

@@ -1 +1 @@
\(10!)
\<10!>

View File

@@ -1,2 +1,2 @@
FATAL: invalid-macro-arg-character.asm(1):
Invalid character in parenthetic macro argument '!'
Invalid character in bracketed macro argument '!'

View File

@@ -1 +1 @@
\(foo)
\<foo>

View File

@@ -1,2 +1,2 @@
FATAL: invalid-macro-arg-symbol.asm(1):
Parenthetic symbol "foo" does not exist
Bracketed symbol "foo" does not exist

View File

@@ -1,19 +0,0 @@
MACRO printargs
PRINTLN "first = \(1)"
FOR I, 2, _NARG
PRINTLN "next = \({d:I})"
ENDR
PRINTLN "last = \({d:_NARG})"
ENDM
printargs A, B, C, D
MACRO mac
println \(2__) + \(1_2) + \(\1)
x = 2
println \({d:x}) + \(1_{d:x}) + \(\(\(13)))
y equs "NARG"
println \(x) + \(1_{d:x}_) + \(\(\(_{y})))
ENDM
mac 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 1

View File

@@ -1,6 +1,6 @@
MACRO N
FOR R,1,_NARG+1
PRINT STRSUB("\n\"\\ PR1NT,ABCDEFGHIMnOSU2_+-()",\(R)+1,1)
PRINT STRSUB("\n\"\\ PR1NT,ABCDEFGHIMnOSU2_+-()<>",\<R>+1,1)
ENDR
REPT R-2
PRINT"\1,"
@@ -8,4 +8,4 @@ SHIFT
ENDR
PRINT"\1\n"
ENDM
N 19,10,12,5,21,3,7,0,15,21,5,3,5,9,6,9,25,7,10,5,16,26,6,0,4,5,18,7,8,3,22,8,5,22,23,11,28,1,2,20,2,1,2,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,1,9,2,28,5,29,26,6,9,6,29,0,14,7,13,5,0,5,14,4,8,3,5,27,24,0,4,5,18,7,8,1,2,6,9,1,0,22,17,18,15,8,0,14,7,13,5,0,4,5,18,7,8,1,2,6,2,20,1,0,14,7,13,19,0,3,7,3
N 19,10,12,5,21,3,7,0,15,21,5,3,5,9,6,9,25,7,10,5,16,26,6,0,4,5,18,7,8,3,22,8,5,22,23,11,28,1,2,20,2,1,2,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,1,9,2,30,5,31,26,6,9,6,29,0,14,7,13,5,0,5,14,4,8,3,5,27,24,0,4,5,18,7,8,1,2,6,9,1,0,22,17,18,15,8,0,14,7,13,5,0,4,5,18,7,8,1,2,6,2,20,1,0,14,7,13,19,0,3,7,3

View File

@@ -1,6 +1,6 @@
MACRO N
FOR R,1,_NARG+1
PRINT STRSUB("\n\"\\ PR1NT,ABCDEFGHIMnOSU2_+-()",\(R)+1,1)
PRINT STRSUB("\n\"\\ PR1NT,ABCDEFGHIMnOSU2_+-()<>",\<R>+1,1)
ENDR
REPT R-2
PRINT"\1,"
@@ -8,4 +8,4 @@ SHIFT
ENDR
PRINT"\1\n"
ENDM
N 19,10,12,5,21,3,7,0,15,21,5,3,5,9,6,9,25,7,10,5,16,26,6,0,4,5,18,7,8,3,22,8,5,22,23,11,28,1,2,20,2,1,2,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,1,9,2,28,5,29,26,6,9,6,29,0,14,7,13,5,0,5,14,4,8,3,5,27,24,0,4,5,18,7,8,1,2,6,9,1,0,22,17,18,15,8,0,14,7,13,5,0,4,5,18,7,8,1,2,6,2,20,1,0,14,7,13,19,0,3,7,3
N 19,10,12,5,21,3,7,0,15,21,5,3,5,9,6,9,25,7,10,5,16,26,6,0,4,5,18,7,8,3,22,8,5,22,23,11,28,1,2,20,2,1,2,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,1,9,2,30,5,31,26,6,9,6,29,0,14,7,13,5,0,5,14,4,8,3,5,27,24,0,4,5,18,7,8,1,2,6,9,1,0,22,17,18,15,8,0,14,7,13,5,0,4,5,18,7,8,1,2,6,2,20,1,0,14,7,13,19,0,3,7,3