Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
21
Task/Extend-your-language/M4/extend-your-language.m4
Normal file
21
Task/Extend-your-language/M4/extend-your-language.m4
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
divert(-1)
|
||||
|
||||
#
|
||||
# m4 is a macro language, so this is just a matter of defining a
|
||||
# macro, using the built-in branching macro "ifelse".
|
||||
#
|
||||
# ifelse2(x1,x2,y1,y2,exprxy,exprx,expry,expr)
|
||||
#
|
||||
# Checks if x1 and x2 are equal strings and if y1 and y2 are equal
|
||||
# strings.
|
||||
#
|
||||
define(`ifelse2',
|
||||
`ifelse(`$1',`$2',`ifelse(`$3',`$4',`$5',`$6')',
|
||||
`ifelse(`$3',`$4',`$7',`$8')')')
|
||||
|
||||
divert`'dnl
|
||||
dnl
|
||||
ifelse2(1,1,2,2,`exprxy',`exprx',`expry',`expr')
|
||||
ifelse2(1,1,2,-2,`exprxy',`exprx',`expry',`expr')
|
||||
ifelse2(1,-1,2,2,`exprxy',`exprx',`expry',`expr')
|
||||
ifelse2(1,-1,2,-2,`exprxy',`exprx',`expry',`expr')
|
||||
Loading…
Add table
Add a link
Reference in a new issue