掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
10進数から2進数に変換する効率のいい方法 (ID:107057)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
Private Function nisinsuu(ByVal data As Long) As String Dim c As Integer '変数cの宣言(ビットの指定) Dim data2 As String '変数data2の宣言(関数の返し値) c = 1 '変数cの初期値の指定 Do Until data < c If (data And c) <> 0 Then data2 = "1" & data2 Else data2 = "0" & data2 End If c = c * 2 Loop nisinsuu = data2 End Function
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.