Search Results - VBForums

Search:

Type: Posts; User: jmsrickland

Page 1 of 13 1 2 3 4

Search: Search took 0.14 seconds; generated 6 minute(s) ago.

  1. Replies
    8
    Views
    151

    Re: Don't understand this If statement

    OK, thanks
  2. Replies
    8
    Views
    151

    Don't understand this If statement

    Why does control go to myfunct? I thought that all conditions had to be true or it wouldn't continue on checking and the first condition is false



    Private Sub Command1_Click()
    Dim binit As...
  3. Re: Send Data To WHatsApp Application From My VB6 Program

    It's a proprietary, cross-platform instant messaging subscription service for smartphones and selected feature phones that uses the Internet for communication. In addition to text messaging, users...
  4. Replies
    9
    Views
    232

    Re: Question about a struct pointer

    Well from looking at your diagram I did one myself and I think I have it down now, at least for these structures, that is.

    If this is correct then I think I can pretty well work it out in the VB...
  5. Replies
    5
    Views
    222

    Re: Newbie "if" question

    The only reason I didn't suggest LaVolpe's suggestion is I think that there could be more in the clause of [leave kitty in place] than just doing nothing, which on the surface would leave kitty in...
  6. Replies
    9
    Views
    232

    Re: Question about a struct pointer

    passel,

    As far as changing the c code that is just for me to see if I can get a better understanding of what is going on so I made a slight change to the original c code and used an array of pcm...
  7. Replies
    9
    Views
    232

    Re: Question about a struct pointer

    I tried changing it over to an array but get access violation but do not get one if I don't use an array . Don't understand that as I thought once defined as an array then the memory has already been...
  8. Replies
    9
    Views
    232

    Re: Question about a struct pointer

    I know incrementing pointer is by size of struct. My question is not that. My question is if pste and pcm are not defined as arrays how then can they be incremented. If I would define pste as PSTE...
  9. Replies
    9
    Views
    232

    Question about a struct pointer

    typedef struct tagCM
    {
    int isqFrom;
    int isqTo;
    unsigned cmk;
    unsigned cmf;
    }
    CM, *PCM;

    typedef struct tagSTE
  10. Replies
    5
    Views
    222

    Re: Newbie "if" question

    Because you want to request that all conditions must be met then you have to do it this way



    If kitty needs to go one square up And _
    kitty is not in the top row of the grid And _
    the...
  11. Re: No type mismatch on one line but yes on next line

    OK, I see what you mean. You're only doing pvec = s_argpvecPiece(ppiFrom.pc) once where I do it each time thru the loop and you're omitting the If pvec = 0 because you have it in the Do While...
  12. Re: No type mismatch on one line but yes on next line

    OK, using your suggestion to use a Do While instead of an If I came up with the following code which appears to give same results as the C code.

    Here's the C code



    for(pvec =...
  13. Re: No type mismatch on one line but yes on next line

    The loop starts out with ppiFrom.pc = 5

    So you are saying that my problem is when I use pvec and it points to an array instead of a single integer

    How do I get around this?
  14. Re: No type mismatch on one line but yes on next line

    Dim a
    Dim b
    Dim c

    b = 1
    c = 5

    For a = b To c
    Next a
  15. No type mismatch on one line but yes on next line

    .bas module code



    Public s_argvecKnight(0 To 8) As Integer
    Public s_argvecBishop(0 To 4) As Integer
    Public s_argvecRook(0 To 4) As Integer
    Public...
  16. Re: Assigning an array to a non-array variable

    The line in VFixSte,

    pcon->argste[i].coUs = pste->coUs ^ (i & 1);

    seems a bit odd to me as pcon->argste[i].coUs and pste->coUs are both pointing to the same memory location so why not just do
    ...
  17. Re: Assigning an array to a non-array variable

    I understand.

    What I posted was just a simple example in order to get the idea of what was taking place. Actually the real code is like this:



    '
    '
    #define csteMAX 256
  18. Replies
    3
    Views
    150

    Re: Struct size question

    I never gave any thought to the year of the book. It was published in 1987 so I guess back then they were 16-bit. It's time to get a new book, I think.
  19. Replies
    3
    Views
    150

    Struct size question

    I have a structure array which contains 5 integers. There are 32 of these structures in the array. When I debug the code I notice as the code goes from one structure to the next that the address...
  20. Assigning an array to a non-array variable

    If I have an array:

    int array[4];

    and a non array:

    int nonarray;

    and I see this:
  21. Replies
    7
    Views
    241

    Re: Using VarPtr

    Another question

    Now let's say that MyArray(0 To 1, 0 To 15) is an array of a UDT which contains mix variable types

    Dim MyArray(0 To 1, 0 To 15) As udtMyUDT

    Now, is there a way to initialize...
  22. Replies
    7
    Views
    241

    Re: Using VarPtr

    Next question.

    Why use VarPtr in conjunction with CopyMemory when MyArray(1,4) = 1962 will do the same thing
  23. Replies
    7
    Views
    241

    Using VarPtr

    I do not get any errors when I run this code



    Dim MyArray(0 To 1, 0 To 15) As Long

    Dim ArrayPtr As Long

    '
    '
  24. Re: how to get how much data consumed by winsock

    I have a felling OP is just going to ask for example again

    .BAS Module (From post #7)



    '
    '
    Public ReceivedData As Long
    Public SentData As Long
  25. Re: Problem understanding how an array is initialized

    No, I missed it. Got to say that gives a lot of info about what is going on. Now I need to digest the comments and see if I can relate them to the actual instruction code line. If I have any...
  26. Re: Problem understanding how an array is initialized

    OK, I gave you the values of the pi struct in my post #5 and also in post #3. It is not important to know the values of all members of the struct as long as you know that the isq member is 112 which...
  27. Re: Problem understanding how an array is initialized

    Already stated by pentagate in post #4



    Questions:

    1) WHAT IS THE MEMORY ADDRESS OF ELEMENT 112 IN ABOVE
    2) WHAT IS THE VALUE OF ppi
    3) WHAT IS THE CONTENT OF THE STRUCT REFERRED TO BY pi
  28. Re: Problem understanding how an array is initialized

    ppi = &pcon->argpi[co][pcon->argcpi[co]++]; would be same as

    &pcon->argpi[1][pcon->argcpi[1]]; at the time it hits the if statement and the contents of
    argcpi[1] is 5

    When the if((pc == 5) &&...
  29. Re: Problem understanding how an array is initialized

    I understand your example but I don't see anything like that in the code snippet I posted previously. All I see is



    PI pi = pcon->argpi[co][0];
    // pi equals argpi[co][0] where co = 1 so we...
  30. Re: how to get how much data consumed by winsock

    In the DataArrival event add the bytesTotal to a module or global level variable to get all bytes received. In the SendProgress event add the bytesSent to a module or global variable to get all bytes...
  31. Re: Problem understanding how an array is initialized

    Thanks, 2kaud, but I pretty much already know these things. I pointed out in my post the same thing.

    What I am asking is not so much where but how do the values get re-arranged in the array....
  32. Problem understanding how an array is initialized

    I have this code which I cut out of a much larger function and have removed a lot of code lines and variables from both the .h file and the .c file just so I have only what is significant for this...
  33. Thread: Using ++

    by jmsrickland
    Replies
    2
    Views
    204

    Using ++

    I have this line of C code



    ppi = &pcon->argpi[co][pcon->argcpi[co]++];



    PPI ppi; //a pointer to a structure
    PCON pcon; //s a pointer to a structure
  34. Re: Too many local, nonstatic variables ?????

    I had same problem with my UDT being too big for the module which has a 64K limit. My UDT had a lot of arrays in it each one having big sizes. To get around this problem I had to define the arrays as...
  35. Thread: Strings

    by jmsrickland
    Replies
    7
    Views
    271

    Re: Strings

    Because I see it being declared in the for statement and if it was declared at the top then his for statement would cause an error:

    function()
    {
    '
    '
    const char *pal
    '
    '
    '
  36. Thread: Strings

    by jmsrickland
    Replies
    7
    Views
    271

    Re: Strings

    Wouldn't it be better to declare it at the top of the code so you don't have to declare it each time you enter a different for, select, etc
  37. Thread: Strings

    by jmsrickland
    Replies
    7
    Views
    271

    Strings

    How do I make a string constant in a function and then refer to each character in that string using a pointer

    Say I want a string of 26 characters "abcdefghijk........stuvwxyz"

    Now I want to...
  38. Replies
    4
    Views
    206

    Re: Array Question

    I found in a book that arrays are row-column order so in Array1[2][16] it would be like the 1st example I showed



    +---+---+---+---+---+-------+----+
    |0,0|0,1|0,2|0,3|0,4|.......|0,15|...
  39. Replies
    4
    Views
    206

    Array Question

    If I see an array defines as this

    array1[2][16];

    how is the array arranged?

    Is it


    0,0 0,1 0,2 0,3 0,4 0,5 0,6 etc
  40. Replies
    4
    Views
    188

    Re: Unhandled exception

    OK, I understand and based on your explanation I found what caused it. I was using a stripped down version for testing and I left out some code lines that variables needed to be initialized. OK now....
Results 1 to 40 of 490
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.