# VB6 to English or Xojo

**URL:** <https://forum.xojo.com/t/vb6-to-english-or-xojo/33975>\
**Category:** General\
**Created:** [October 17, 2016, 5:35pm UTC](https://forum.xojo.com/t/vb6-to-english-or-xojo/33975 "2016-10-17T17:35:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jym\_Morton](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/ecd19e/32.png) [@Jym\_Morton](https://forum.xojo.com/u/Jym_Morton)\
**Post date:** [October 17, 2016, 5:35pm UTC](https://forum.xojo.com/t/vb6-to-english-or-xojo/33975/1 "2016-10-17T17:35:58Z")

</div>

I’m looking at a 2001 function (vb6) and I’m having trouble understanding the If statement.

Sub x(a As byte) As byte

If (a AND &H80) then

TIA

---

<div class="post-metadata">

**Author:** ![Norman\_P](https://forum.xojo.com/letter_avatar_proxy/v4/letter/n/858c86/32.png) [@Norman\_P](https://forum.xojo.com/u/Norman_P)\
**Post date:** [October 17, 2016, 5:40pm UTC](https://forum.xojo.com/t/vb6-to-english-or-xojo/33975/2 "2016-10-17T17:40:19Z")

</div>

its a bitwise and

basically testing it the high bit is set

that code will NOT work in Xojo “as is”

basically it needs to be  
If (a AND &H80) \<\> 0 then

---

<div class="post-metadata">

**Author:** ![Jym\_Morton](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/ecd19e/32.png) [@Jym\_Morton](https://forum.xojo.com/u/Jym_Morton)\
**Post date:** [October 17, 2016, 5:47pm UTC](https://forum.xojo.com/t/vb6-to-english-or-xojo/33975/3 "2016-10-17T17:47:37Z")

</div>

That worked thanks.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 6:30pm UTC](https://forum.xojo.com/t/vb6-to-english-or-xojo/33975/4 "2020-10-29T18:30:50Z")

</div>


