【发布时间】:2016-01-13 06:58:45
【问题描述】:
我正在关注一本关于 Liberty BASIC 编程的书中的代码:
NOMAINWIN
PROMPT "Your name"; name$
CALL DisplayMessage name$
END
SUB DisplayMessage stuff$
X = INT(RND(1) * 2) + 1
IF X = 1 THEN
NOTICE stuff$ + " is a nice person."
ELSE
NOTICE stuff$ + " is a terrible person."
END IF
END SUB
想知道为什么不在子例程中使用name$ 而不是stuff$?以及子程序如何知道在name$ 和stuff$ 之间建立连接?
【问题讨论】:
标签: string variables call subroutine basic