Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何用宏正确连接整数?我必须在这里调用它两次,因为我不能在 ","(error) 之后添加一些东西
#define concat(a,b,c) a##b##c dim as integer a=10,b=20,c=30,d d = a concat(*100+,,)b d = d concat(*100+,,)c ?d 'output = 102030 sleep
#define concat(a,b,c) val(str(a)+str(b)+str(c))
我从 freebasic 论坛找到了一个解决方案
#define concat(a,b,c) (((a)*100+(b))*100+(c)) dim as integer a=10,b=20,c=30,d d = concat(a,b,c) ?d 'output = 102030 sleep