CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: kolt007

Page 1 of 8 1 2 3 4

Search: Search took 0.03 seconds.

  1. Thread: || operator

    by kolt007
    Replies
    34
    Views
    5,353

    Re: || operator

    Well this conversation is begining to circle. I will explain to you what I explained to everyone.



    Continuing while true means that it will stop (break) as soon as it's not true


    This is...
  2. Thread: || operator

    by kolt007
    Replies
    34
    Views
    5,353

    Re: || operator

    Yes, I am aware. As I said I was under the impression it breaks when false, not continues while true.
  3. Thread: || operator

    by kolt007
    Replies
    34
    Views
    5,353

    Re: || operator

    Of course you can take a piece of code and transform it into a different but equivalent piece of code. And if you feel one form is easier to comprehend or has greater explanatory powers that's fine
    ...
  4. Thread: || operator

    by kolt007
    Replies
    34
    Views
    5,353

    Re: || operator

    Java is not an entity who is looking at code contemplating what to do with it, and programming is not trying to secondguess what that Java entity might decide to do. Instead Java is a set of rules...
  5. Thread: || operator

    by kolt007
    Replies
    34
    Views
    5,353

    Re: || operator

    Java doesn't "desire to keep going while it's true", it desires to work out whether the compound expression (b || d) is true or false

    Inaccurate it doesn't need to find out if the 'compound'...
  6. Thread: || operator

    by kolt007
    Replies
    34
    Views
    5,353

    Re: || operator

    First:



    hat's not quite true because if both b and c are true then "do this" will be repeated twice in the separated case. Instead,

    You took it too literally.
  7. Thread: || operator

    by kolt007
    Replies
    34
    Views
    5,353

    Re: || operator

    It does break when the condition is false, but when you have 2 expressions OR'd together the condition can only be false if both the expressions evaluate to false. Re-read all the answers and you...
  8. Thread: || operator

    by kolt007
    Replies
    34
    Views
    5,353

    Re: || operator

    Ah, I see my confusion was in the function of the while I was under the impression it broke when the value/s was/are false but, rather it continues while the value is true, which seems like the same...
  9. Thread: || operator

    by kolt007
    Replies
    34
    Views
    5,353

    Re: || operator

    I think we should all understand I am aware of the use of a logical or statement hence I used it above. But, the issue here is that this program defies that logic. I understand if your through with...
  10. Thread: || operator

    by kolt007
    Replies
    34
    Views
    5,353

    Re: || operator

    So, back to the top question, how is it a logical or if they both have to be true? I think I may get it, if it were an if statement it'd be if either of them reign true, but sense it's a while it...
  11. Thread: || operator

    by kolt007
    Replies
    34
    Views
    5,353

    Re: || operator

    do {
    if(file.substring(i, i+3).equals("|||")) {
    atName = true;
    i=i+3;
    }

    if(atName){
    ...
  12. Thread: || operator

    by kolt007
    Replies
    34
    Views
    5,353

    Re: || operator

    I don't mean to be argumentative (I think from this point on I'll stop explaining my intentions my hope is we have a good enough understanding at this point, of course as the pupil so to speak I'll...
  13. Thread: || operator

    by kolt007
    Replies
    34
    Views
    5,353

    || operator

    do {
    if(file.substring(i, i+3).equals("|||")) {
    atName = true;
    i=i+3;
    }

    if(atName){
    ...
  14. Replies
    6
    Views
    1,237

    Re: Basic array question

    Thanks again for your time keang. So, a good programmer is defining one's logical ability more than anything.

    Another Thread (as with many) resolved by Keang !
  15. Replies
    6
    Views
    1,237

    Re: Basic array question

    Okay thanks keang, do you know of any good places to lean a bit about the JNI (what I am to believe is coined as 'assembly code'). Only if you know off-hand a good place othewise i'll just google it....
  16. Replies
    6
    Views
    1,237

    Re: Basic array question

    Okay I suppose I have some learning to do then. First though, to make sure were not just missunderstanding each other. When I said pointers I meant the 'term' meaning not the elements. For example...
  17. Re: HELP - placing picture on top of another picture in Java - JLayerPane

    For me I use an overriden paintComponent();

    I suggest using JFrame, then overriding Paint(), then placing a picture ontop of another is as simple as the order you draw the images in.
  18. Replies
    6
    Views
    1,237

    [RESOLVED] Basic array question

    This is one of those things that's hard to google, but an experienced person has no problem coming up with the answer. Perhaps I am not using the right terminology, anyways. Is there anyway to load...
  19. Replies
    4
    Views
    1,476

    Re: calculator program

    Thank you. If I may ask I hav the following error it says "Creat a method arithmeticCalculator(int,int,java.lang.String) in calcultor" I n this of my code....
  20. Replies
    4
    Views
    1,476

    Re: calculator program

    Without looking at your current code, I understand you need to test for the press of 'N'. I would use keyevent listner to run a continous loop to check for the pressing of N. This is done by using a...
  21. Thread: 2s Complement

    by kolt007
    Replies
    0
    Views
    1,300

    2s Complement

    public void handlesinglepixel(int x, int y, int pixel) {
    int alpha = (pixel >> 24) & 0xff;
    int red = (pixel >> 16) & 0xff;
    int green = (pixel >> 8) & 0xff;
    int blue =...
  22. Replies
    7
    Views
    1,748

    Re: Image handling

    It's nice to be able to solve a thread. Thanks once again.
  23. Replies
    7
    Views
    1,748

    Re: Image handling

    Obviously you were right. If I could, I'd like to inquire about one more thing. Why when drawing an image (amoungst other things) do I need an 'Observer' I generally just use the class or the method...
  24. Replies
    7
    Views
    1,748

    Re: Image handling

    Yes, I took your advice I use this now:



    do {
    g.drawImage(Juggernaut, playerX+curX[cur], playerY+curY[cur]+qu, playerX+curX[cur]+cLen[cur], playerY+curY
    ...
  25. Replies
    7
    Views
    1,748

    Re: Image handling

    I am using this:


    g.drawImage(Juggernaut, playerX+4, playerY, playerX+8, playerY, 9, 0, 13, 0, this);
    g.drawImage(Juggernaut, playerX+8, playerY+1, playerX+14, playerY+1, 8, 1, 14, 1,...
Results 1 to 25 of 198
Page 1 of 8 1 2 3 4





Click Here to Expand Forum to Full Width

Featured