-
JavaScript で NaN を大小比較に使用すると、結果が常に false になります。
このため、変数の内容に NaN がありえる状況では、
if 文の条件式を書き換えると 結果が変わってくるケースがあります。 -
例えば、
if (x < 0 || x > 10) { y = 1; } else { y = 2; }
| --- console20140622.stub 2014-06-20 15:56:48 +0900 | |
| +++ console.stub 2014-06-22 18:33:51 +0900 | |
| @@ -268,7 +268,9 @@ | |
| :type <boolean>) | |
| (key.repeat-count :c-name "rec.Event.KeyEvent.wRepeatCount" | |
| :type <int>) | |
| - (key.virtual-key-code :c-name "rec.Event.KeyEvent.wVirtualScanCode" | |
| + (key.virtual-key-code :c-name "rec.Event.KeyEvent.wVirtualKeyCode" | |
| + :type <int>) | |
| + (key.virtual-scan-code :c-name "rec.Event.KeyEvent.wVirtualScanCode" |
| --- console_orig.stub 2015-02-24 13:43:19 +0900 | |
| +++ console.stub 2015-03-03 13:57:53 +0900 | |
| @@ -71,7 +71,7 @@ | |
| (define-enum CTRL_C_EVENT) | |
| (define-enum CTRL_BREAK_EVENT) | |
| -(define-cproc sys-generate-console-ctrl-event (event::<int> pgid::<int>) | |
| +(define-cproc sys-generate-console-ctrl-event (event::<int> pgid::<uint>) | |
| ::<void> | |
| (check (GenerateConsoleCtrlEvent (DWORD event) (DWORD pgid)))) |
| --- error_orig.c 2015-07-02 18:12:26 +0900 | |
| +++ error.c 2015-07-03 00:14:02 +0900 | |
| @@ -650,17 +650,23 @@ | |
| syserr = SCM_MAKE_STR_COPYING(strerror(en)); | |
| #else /*GAUCHE_WINDOWS*/ | |
| if (en < 0) { | |
| - LPTSTR msgbuf; | |
| + ScmObj ostr = Scm_MakeOutputStringPort(TRUE); | |
| + LPTSTR msgbuf = NULL; | |
| const char *xmsgbuf; |
| --- example9-4_orig.scm 2014-12-29 21:55:10 +0900 | |
| +++ example9-4.scm 2015-06-14 21:03:17 +0900 | |
| @@ -80,6 +80,11 @@ | |
| (glut-init-window-size 250 250) | |
| (glut-init-window-position 100 100) | |
| (glut-create-window (car args)) | |
| + | |
| + ;; When using GLEW, 'glew-init' must be called after 'glut-create-window' | |
| + ;; to use OpenGL extensions such as 'gl-tex-image-3d'. | |
| + (glew-init) |
| 7.7.0 (master): MinGW: gctest.exe fails | |
| from #166 | |
| > 1. Could you please recheck it using master branch of bdwgc (with any libatomic_ops)? | |
| > 2. Same as 1 plus --disable-parallel-mark --enable-gc-assertions | |
| > 3. Same as 2 plus comment out THREAD_LOCAL_ALLOC definition in include/config.h | |
| I tried a master branch, but I got many failures. |
| <Gauche の Windows コンソールのコードページ対応の試験> | |
| 1. 試験環境 | |
| OS : Windows 8.1 (64bit) | |
| 開発環境 : MSYS2/MinGW-w64 (64bit) (gcc version 7.1.0 (Rev2, Built by MSYS2 project)) | |
| Gauche : v0.9.6_pre2 (コミット aa189e6 + 変更) | |
| mintty : v2.7.7 (x86_64-pc-msys) | |
| winpty : v0.4.3 | |
| emacs : v25.2.1 (x86_64-w64-mingw32) |
| <調査中> | |
| MSYS2/MinGW-w64 32bit 開発環境での Gauche v0.9.6_pre2 のビルド/テストでエラーが出る。 | |
| MSYS2/MinGW-w64 64bit や MinGW.org (32bitのみ) の開発環境では発生しない。 | |
| OS : Windows 8.1 (64bit) | |
| 印象としては、ほとんど動作していて、ごくまれに文字列が化ける感じ。 | |
| (1)MSYS2/MinGW-w64 32bit 開発環境での Gauche v0.9.6_pre2 のビルドで以下のエラー |
| <Gauche の Windows コンソールのコードページ対応の測定> | |
| 1. 環境 | |
| OS : Windows 8.1 (64bit) | |
| 開発環境 : MSYS2/MinGW-w64 (64bit) (gcc version 7.1.0 (Rev2, Built by MSYS2 project)) | |
| Gauche : v0.9.6_pre2 (コミット aa189e6 + 変更) | |
| 2. 測定 |
| ;; | |
| ;; testing format ~f | |
| ;; | |
| (use gauche.test) | |
| (use math.const) ; for pi | |
| (test-start "format ~f") | |
| (define-syntax expr-test |