Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: tvign
  • Order by date
  1. tvign

    control in a loop

    Dave, What if someone lays a book on the ESC key? What happened to the previous setting of ON ESCAPE? What if you want all applications to use F10 instead of ESC? Of course, if you don't believe in resuable code, that's cool. Tony
  2. tvign

    export foxpro table to excel

    You can use either COPY TO or EXPORT with the TYPE parameter. I use TYPE XL5. Tony
  3. tvign

    control in a loop

    You can add this to your loop to allow it to be ended (interrupted) by pressing the escape key. *___________________________________________________________________ * * CANCEL OBJECT CLASS * Version = 1.0 * Copyright (C) 2002 Vignone...
  4. tvign

    Help - 2GB Limit Hit

    Some time ago, I wrote a DOS program that reads a dbf and outputs a space delimited text file. You could then modify it an import it into a new dbf. If you would give me your email address, I can send you the EXE. Tony
  5. tvign

    numeric comparison issue

    Wayne, No, a little longer. I love a challenge. You might what to improve in the two routines that get the 3rd reel, getLargeThird and getAnyThird. They should get one that is closer to the size of the smaller or a multiple of the smaller or ... anything else that you can think of. Tony
  6. tvign

    numeric comparison issue

    Wayne, I cleaned up the program and defined a class for the reels. This way you can use the program as is (if it has any value to you) and implement your own reel class in a more appropiate way. Keep in mind, I still suspect that this is an Operations Research type of problem requiring Linear...
  7. tvign

    numeric comparison issue

    Wayne, Sorry, two mistakes in reporting the 3rd reel. Were it says ?" and "+str(i) use ?" and "+substr(reel(i),5) && the reel number Tony
  8. tvign

    numeric comparison issue

    Wayne, Second thoughts lead to an enhancement of the invariant: "We want always to braid two reels with minimum difference (both reels less than the maximum one) with a third reel that is 100' longer than the shortest of the first two. Here is a rough program that utilizes that invariant...
  9. tvign

    numeric comparison issue

    Wayne, My first thoughts are for the invariant of a loop. Let's see ... we want always to braid two reels with minimum difference with a third reel that is 100' longer than the shortest of the first two. In your example, that would be 265 and 275 (leaving scrap of 10') braided with any other...
  10. tvign

    Insert array contents in messagebox

    Alex, Your problem is written in VB, However, here's the VFP version that works. I tried it with a 2x2 array. *Setup an example dimension strArray(2,2) strArray(1,1) = "AAA" strArray(1,2) = "BBB" strArray(2,1) = "CCC" strArray(2,2) = "DDD" store 2 to endrow,endcol *Run the Test strOut = ""...
  11. tvign

    Incorrect results using exponentiation with the INT() function

    Dave, Good show! If you put in 4.9811 with DECIMALS 4 you get back 4.98109961 and int(4.98109961*10^5) = 498109. Voila! It looks like assigning 4.9811 to a variable causes it to be stored internally as Single Precision Hex:409f652b which is 4.98109961 when DECIMALS is 4 and 4.9811 when...
  12. tvign

    Incorrect results using exponentiation with the INT() function

    Mike, I was just keeping the original test environment the same as defined by Dave L. Tony
  13. tvign

    Incorrect results using exponentiation with the INT() function

    This gets even worse. Try this and see totally inconsistant results proving that INT is a Microsoft special math function - Hungarian Math, maybe?? Avoid the INT function! SET DECIMALS TO 4 FOR l_nNewValue = 4.9810 to 4.9815 step .0001 ? l_nNewValue ? l_nNewValue*(10^5) ...
  14. tvign

    Incorrect results using exponentiation with the INT() function

    INT must respect the mathematical meaning not the internal problem of representing integers with binary numbers. When a binary result translates to 44.99999999999999...etc, the compiler should realize that it is 45 not the floor, 44. Tony
  15. tvign

    Incorrect results using exponentiation with the INT() function

    Dave, You are right, the INT function is incorrect. INT(l_nNewValue*(10^5)) is returning the FLOOR since the result must be a smidgen below 498110 (in binary). It should be returning the CEILING. I tried the same program in TRU BASIC which is a mathematical language (compiler written by...
  16. tvign

    myVariable vs lcMyVariable

    Mike: I understand you situation. I am not bound by clients. Neil and Craig: Taking Craig's example, Not necessarily apparent unless all variables and functions are stongly typed. If they are not and are polymorphic, then it actually obfuscates. Say, gcY = date() and...
  17. tvign

    Displaying large numbers in v. foxpro

    Stella740pl is right... However, str(number,16) will not display decimals if there are any. It displays integers only (positive and negative whole numbers) ?str(-12345678.8765,16) displays -12345679 It rounds also, and curiously. It rounds the absolute value! Tony
  18. tvign

    myVariable vs lcMyVariable

    Mike, Point taken. However, when I'm reading a mathematical proof or the derivation of a economics law, there are many lines...with no Hungarian or other derived notation except the standard, universally accepted, variable names and local ones. The local ones are usually defined at the...
  19. tvign

    myVariable vs lcMyVariable

    Mike But, he didn't. That's the idea. No program part (subroutine or function, with it's local variables) need be more than half a page. If it is, then good structured and object oriented programming practices are being violated. I cant imagine that you are coding a method with 5000 lines...
  20. tvign

    myVariable vs lcMyVariable

    Bill, I appreciate you input. When I do 'mathy' things, I prefer standard math/science variable names (v velocity, m mass, theta angle, etc.) But you are right when we are in the database manipulation arena. And, thanks for reminding me about the m-dot issue. Tony

Part and Inventory Search

Back
Top