macro01

来自「开放源码的编译器open watcom 1.6.0版的源代码」· 代码 · 共 31 行

TXT
31
字号
#
# Macro Test # 1
# Test in Microsoft Mode
#
temp = HELLO
temp = $(temp:LLO=2) 
all: hello
   echo $(temp)
temp = $(temp:2=LLO) 
hello:
   echo $(temp)

!if "$make" == "$(make)" # This is a proxy for !if not microsoft
!error This file requires microsoft compatibility (-ms)
!endif

# Stress macros@DeMacroName
mac=hello
mac=mac$mac(mac)$(mac)$(mac:l=)$$(mac)mac
h=hello
h=h$h(h)$(h)$(h:l=)$$hh

.after
!ifdef __UNIX__
     @echo '$$(mac)=$(mac)'
     @echo '$$h=$h'
!else
     @echo $$(mac)=$(mac)
     @echo $$h=$h
!endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?