Solved

C code to Visual Basic Net

Posted on 2006-11-01
2
193 Views
Last Modified: 2010-04-15
Hi,

Can anyone give me the VB.Net equivalent of the following C line of code, or explain the C syntax?

Thank you.

kb[6-i][1+j] |= newbit[j*8+k] << (7-k);
0
Comment
Question by:IAJWDDIY
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 45

Accepted Solution

by:
sunnycoder earned 500 total points
ID: 17848666
Hi IAJWDDIY,

kb is a 2D array ... newbit is a 1D array ...
This code is same as

a = kb[6-i][1+j]; ...... get element in (6-i)th row and (1+j)th column
b = newbit[j*8+k]; ..... get (j*8+k)th element from newbit array
b = b << (7-k); .... Left shift it 7-k times
a = a | b; .... Bitwise OR a with b
kb[6-i][1+j] = a .... store the result back in 2D array at the same location ... (6-i)th row and (1+j)th column

Cheers!
sunnycoder
0
 

Author Comment

by:IAJWDDIY
ID: 17848721
Thanks sunnycoder!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question