[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

C code to Visual Basic Net

Posted on 2006-11-01
2
Medium Priority
?
201 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
2 Comments
 
LVL 45

Accepted Solution

by:
sunnycoder earned 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
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…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.
Suggested Courses

873 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