Search:

Type: Posts; User: JohnW2

Page 1 of 7 1 2 3 4

Search: Search took 0.07 seconds.

  1. VS 2008 Re: Timer 1 function Seconds = Count Mod 60 advances minutes after 30 sec instead of

    Ah, right - pleased to hear that you are human :) I have to say that I can think of several languages that would use Floor(<expression>), but none that would use <expression>.Floor() ! .. but I...
  2. VS 2008 Re: Timer 1 function Seconds = Count Mod 60 advances minutes after 30 sec instead of

    For my education, could you perhaps explain that syntax to me (I don't currently have access to VS to try it)? I would have written:

    Minutes = Floor((Count / 60))
    ... or, indeed, if were...
  3. VS 2019 Re: Precision of Double variables for positive integers

    I guess that makes sense if/when one's main concern is about precision, rather than capacity.

    In the situation you mentioned, of using 80 bits for intermediate storage during calculations on...
  4. VS 2019 Re: Precision of Double variables for positive integers

    For what it's worth, I think that the 'Extended Double' ('Long Double') 80-bit formats I've come across have had a 64 or 65 bit mantissa and a 15 bit exponent - i.e. both mantissa and exponent have...
  5. VS 2019 Re: Precision of Double variables for positive integers

    I'm reassured to see that I'm not the only one who can miscount and miscalculate :)



    Even though you say above that you 'disagree' with it, that last point of yours is really what I've been...
  6. VS 2019 Re: Precision of Double variables for positive integers

    I've only just seen this edit ...



    Indeed, but do you not mean 15 (rather than 13) decimal digits (i.e. 1 to the left, and 14 to the right, of the decimal point) (and 1+17 for a 'true...
  7. VS 2019 Re: Precision of Double variables for positive integers

    Indeed - but until I'd read the rest of your post, I hadn't thought of a way that I could see 'the true value of the variable', other than by having it converted to a string ....

    As you say, I...
  8. Replies
    18
    Views
    1,055

    VS 2017 Re: DGV, Adding columns, display result

    Glad it's sorted, but it make me wonder what actually triggers the DataGridView_TextChanged event (clearly, from your experience, the change of a cell value doesn't) - any ideas?

    Kind Regards, ...
  9. VS 2019 Re: Precision of Double variables for positive integers

    Well, like it or not, even in the US, once one has got smaller than minutes, you are stuck with a 'metric system' of time measurement :)

    Kind Regards, John
  10. VS 2019 Re: Precision of Double variables for positive integers

    Indeed - but, since they didn't include a TotalMicroseconds and/or TotalNanoseconds (or even Total100Nanoseconds), they really had no choice other than to have TotalMilliseconds as floating-point...
  11. VS 2019 Re: Precision of Double variables for positive integers

    I should have added to what I just posted ....



    The value of 1.79769313486232E+308 is certainly the largest that a Double can be displayed as in a control - that is what I see if I assign...
  12. VS 2019 Re: Precision of Double variables for positive integers

    Indeed, and I suppose I did not make life any easier for my thinking by not looking and seeing that the number I arbitrarily chose had 7 trailing zeros in its binary representation!

    Are we agreed...
  13. VS 2019 Re: Precision of Double variables for positive integers

    Yes, I noticed that. However, when one does that hovering, it says that it is "(constant)" and then, just in case one didn't read that, then also goes on to say "This field is constant". I think...
  14. VS 2019 Re: Precision of Double variables for positive integers

    Well, for a start, not for me - if I push that into a textbox, what I get is ...

    1.79769313486232E+308

    ... which is the 16 decimal mantissa digits I would roughly expect, missing off the last...
  15. VS 2019 Re: Precision of Double variables for positive integers

    With respect, that's not the point. The documentation was showing a number (well, two numbers) which had 18 decimal digits in their mantissas, yet, with the IEEE format, there is only space to store...
  16. VS 2019 Re: Precision of Double variables for positive integers

    Indeed so. However, as you will presumably understand, I'm trying to get some reassurance that it is an error in the documentation, rather than something I don't understand properly.

    I initially...
  17. VS 2019 Re: Precision of Double variables for positive integers

    It's not a theoretical or hypothetical question. It's an attempt on my part to understand why/how the documentation says something had me misled for a good while until I thought things through and...
  18. VS 2019 Re: Precision of Double variables for positive integers

    That's not surprising - we know that floating-point operations can be imprecise when one is not dealing with an integer that can be fully accommodated within the mantissa part of the storage. ...
  19. VS 2019 Re: Precision of Double variables for positive integers

    Yes, I fully understand IEEE floating point representation, and that is the very basis of my point. That article confirms, as I have said, that there are 52 bits for the mantissa in a 64-bit...
  20. VS 2019 Re: Precision of Double variables for positive integers

    It's not just a question of precision or exactness - it's about how, as the documentation seems to imply, one can get a number with 10 decimal digits out of 52 bits of binary storage.

    Kind...
  21. VS 2019 Re: Precision of Double variables for positive integers

    Yes, I understand all that, and I'm not wanting to store very large numbers.

    In the context in which this arose, we are stuck with Double, since that's what the property in question was returning...
  22. VS 2019 Precision of Double variables for positive integers

    In a recent thread, I wanted to talk about the capacity of Double variables to store positive integers (in comparison with Long ones), and got a bit confused by what was written in the documentation....
  23. Replies
    29
    Views
    4,950

    VS 2019 Re: Stopwatch Resolution

    Thanks. I've downloaded that and stored it away, in case I ever have the time and the need for some bedtime reading! At a glance, it certainly looks intellectually interesting - although, it will...
  24. Replies
    29
    Views
    4,950

    VS 2019 Re: Stopwatch Resolution

    True. On reflection, perhaps it's more likely that any future change will be 'the other way around' - i.e. in response to user demand for potentially higher resolution timing, maybe hardware...
  25. Replies
    29
    Views
    4,950

    VS 2019 Re: Stopwatch Resolution

    [ if anyone doesn't agree with me that this terminology is (undesirably/unnecessarily) confusing, then I'm not sure that they are on the same planet as me :) ]

    ... and don't forget that that was...
  26. Re: vb.net 2019 line continuation character question

    Yes, that was one of the earliest things I discovered about VB.net (although I think it must not be just the compiler, since it detects this situation 'as one types').

    It's even clever enough to...
  27. Replies
    29
    Views
    4,950

    VS 2019 Re: Stopwatch Resolution

    You're right - my thinking went all wrong and ended up with my probably asking the wrong question - my apologies. I think that the question I probably should have asked is nothing to do with...
  28. Replies
    29
    Views
    4,950

    VS 2019 Re: Stopwatch Resolution

    I realise that. Maybe, by trying to “please too many people for too much of the time”, they have created something that is too complicated for it’s own (and users’) good - i.e. something “which...
  29. Replies
    61
    Views
    9,619

    Re: StringBuilder vs Concatenation

    I'm sure that's very good general advice. However, as you go on to say, the primary issue discussed in this thread (concatenation vs. StringBuilder) is one case in which choice of method of coding a...
  30. Replies
    61
    Views
    9,619

    Re: StringBuilder vs Concatenation

    Indeed so - and, as you have probably guessed, all those mathematical operations are there because without them I could not see a difference, even in Debug mode! Furthermore, in practice, the...
  31. Replies
    61
    Views
    9,619

    Re: StringBuilder vs Concatenation

    Having more-or-less resolved (and fairly extensively investigated) the issue which I initially raised in this thread (performance issues of combining strings by concatenation or StringBuilder), I...
  32. Replies
    29
    Views
    4,950

    VS 2019 Re: Stopwatch Resolution

    Certainly no offence taken! It's probably not that easy to see, since some of the posts have been lengthy and rather 'rambling' (as probably will be the case with this one!), but if you looked...
  33. Replies
    29
    Views
    4,950

    VS 2019 Re: Stopwatch Resolution

    OK. There’s probably not much more that needs to be said about this, since it seems that the situation really is as ‘simple’ as I thought, the perceived reasons for it ‘being as it is’ being...
  34. Replies
    29
    Views
    4,950

    VS 2019 Re: Stopwatch Resolution

    [ throughout this, I will be talking about ‘old’ machines in which the stopwatch ticks are at ~300 ns intervals but the DateTime/TimeSpan ones at 100 ns intervals. Trying to think/talk about the...
  35. Replies
    61
    Views
    9,619

    Re: StringBuilder vs Concatenation

    Glad you like it :) How about this addition - it seems that around 10% of the execution time when using SB is simply the time taken to loop, even if the loop is 'empty'.

    172693

    Kind Regards,...
  36. Replies
    61
    Views
    9,619

    Re: StringBuilder vs Concatenation

    OK, herewith an updated (corrected!) version of the preliminary test results I reported in post #34. I have corrected a silly mistake/oversight in my coding, and this time have run the tests in...
  37. Replies
    29
    Views
    4,950

    VS 2019 Re: Stopwatch Resolution

    I'm afraid that I'm still rather confused, and therefore need to do some thinking and playing, and gets my thoughts straight, before I can really respond usefully - watch this space!

    Kind Regards,...
  38. Replies
    61
    Views
    9,619

    Re: Viewing whole datagridview to rich text box

    It sounds as if I wasn't clear enough, since you appear not to have realised that that was my very point - i.e. that, if written as a single assignment, MyVar would only appear once in this ...

    ...
  39. Replies
    61
    Views
    9,619

    Re: StringBuilder vs Concatenation

    Yes. I think I would probably struggle to think of why I would ever want to do the sort of things we're talking about with anything other than local variables.



    If that's true, I think that...
  40. Replies
    29
    Views
    4,950

    VS 2019 Re: Stopwatch Resolution

    As I said, I was a bit confused by what he was saying, but he seemed clear enough about the situation with his machine when he wrote:



    If his code, running on his machine, could see (and count)...
Results 1 to 40 of 260
Page 1 of 7 1 2 3 4



Click Here to Expand Forum to Full Width