0
2

More than 3 years have passed since last update.

VBA Javaの厳密等価演算子===に近い異型不許容等価関数

Posted at
Function isTypeValueEqual(a, b) As Boolean
If VarType(a) = VarType(b) And _
a = b Then
  isTypeValueEqual = True
Else
  isTypeValueEqual = False
End If
End Function

つまり型が違うときは等価ではないので、型が等価かどうかを判定する。
これを勝手に異型不許容等価演算と呼ぶことにする。
これをUDF、ユーザー定義関数化しているので異型不許容等価関数ということにする。
実際は文字列型は文字列型に寄せる必要があるため、完全に厳密等価演算子というわけには行かないが、基本の異型不許容等価演算の部分はこれで行けるかもしれない。

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2