問題タブ [platform-agnostic]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c - 不明な型と負の値の比較
id
プラットフォームごとに型が異なる変数があります。いくつかの場所で、既存のコード (私は変更できません) がid
を「負の」値に設定します。
一部のプラットフォームでid
は、署名されている場合があります。他のものでは、署名されていない可能性があります。id
が に設定されているかどうかをテストしたい-ETIMEDOUT
。id
が署名されていない場合、以下の単純な試みは微妙に失敗します。
この状態を簡潔にテストするにはどうすればよいですか?