Просмотр исходного кода

BROWSE: ignore invalid digits

Documentation in block 100 says a number followed by a space or return
lists the contents of the block. However, typing any other character
does this too, because _pdacc returns -1 in this case.

This is annoying because typing "n" instead of "N" immediately after
jumping to some block was bringing you to block 0. Now "n" is ignored
instead.

This commit changes the condition for printing to explicitly check for
the value of 1, which means whitespace according to _pdacc documentation
in block 355.
pull/123/head
Alexander Krotov 4 лет назад
Родитель
Сommit
3475f2179d
1 измененных файлов: 1 добавлений и 1 удалений
  1. +1
    -1
      blk/106

+ 1
- 1
blk/106 Просмотреть файл

@@ -2,7 +2,7 @@ CREATE ACC 0 ,
: _LIST ." Block " DUP . NL LIST ;
: _NUM
ACC @ SWAP _pdacc
IF _LIST 0 THEN
1 = IF _LIST 0 THEN
ACC !
;
: L BLK> @ _LIST ;


Загрузка…
Отмена
Сохранить