Add tags

Add tags to the following comment

スレッド? そりゃ食いもんか?

BASIC の INKEY$ はブロッキングしないので、ゲームとか作るのに便利です。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
100 *Init           '*** 初期化 ***
110   cls
120   t$=time$
130   active=1      ' タイマー実行中フラグ
140 *MainLoop       '*** メインループ ***
150   ' キー入力を1文字読み込む
160   c$=inkey$
170   ' qで終了、pで停止/再開
180   if c$="q" then end
190   if c$="p" then active=1-active
200   ' time$ (=hh:mm:ss) が変化したらタイマー発動
210   if t$=time$ then goto *MainLoop
220   t$=time$
230   if active=1 then gosub *OnTimer
240   goto *MainLoop
250 *OnTimer        '*** タイマーイベントハンドラ ***
260   print "a"
270   return

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...