[VB6 ][VBA]請問 and 的問題

看板Visual_Basic作者 (gecer)時間10年前 (2014/12/15 21:40), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串1/1
小弟最近參考一個更改file property的程式 http://stackoverflow.com/questions/750679/how-do-you-make-a-file-writeable-in- vb Dim fso As New FileSystemObject Dim fil As File Set fil = fso.GetFile("C:\foo.txt") If (fil.attributes And vbReadOnly) Then fil.attributes = fil.attributes -vbReadOnly End If 小弟watch fil.attributes =32 如果是唯讀的檔案 但是為什麼 32 and 1 =0 ? 請問在這裡and的作用 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 111.255.25.29 ※ 文章網址: http://www.ptt.cc/bbs/Visual_Basic/M.1418650853.A.446.html

12/15 22:07, , 1F
這是 bitwise and
12/15 22:07, 1F
文章代碼(AID): #1KZkJbH6 (Visual_Basic)
文章代碼(AID): #1KZkJbH6 (Visual_Basic)