Page 2 of 2 FirstFirst 12
Results 41 to 65 of 65

Thread: Can anyone write an array module?

  1. #41
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,120

    Re: Can anyone write an array module?

    Exactly. The future is using web technologies for desktop development. Everything running on the desktop will be re-written in JS using Electron, not .Net and not VB6.

    This means shipping large part or Chrome along with V9 engine in each and every desktop app. A 200MB chunk but who cares!

    Such apps *are* portable (single exe) but can be installed in local (APPDATA) folder *and* can be auto-updated there.

    Learn JS, learn React, secure next 20 years as a professional developer :-))

    cheers,
    </wqw>

  2. #42
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,235

    Re: Can anyone write an array module?

    Quote Originally Posted by wqweto View Post
    Exactly. The future is using web technologies for desktop development.

    Learn JS, learn React, secure next 20 years as a professional developer :-))

    </wqw>
    For some reason entirely by accident I seem to have the correct skillset for the above...

    Trouble is, I am REALLY enjoying programming in VB6, more than I ever did before!
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  3. #43
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: Can anyone write an array module?

    Quote Originally Posted by wqweto View Post
    Exactly. The future is using web technologies for desktop development. Everything running on the desktop will be re-written in JS using Electron, not .Net and not VB6.

    This means shipping large part or Chrome along with V9 engine in each and every desktop app. A 200MB chunk but who cares!

    Such apps *are* portable (single exe) but can be installed in local (APPDATA) folder *and* can be auto-updated there.

    Learn JS, learn React, secure next 20 years as a professional developer :-))

    cheers,
    </wqw>
    I can cosign this. Though in my case, I'd rather stick with Microsoft since I don't have to relearn much. I can use a lot of the same .Net code I've been writing for years. Blazor and the upcoming .Net MAUI are already looking pretty solid in world of Web Applications but I see no problems with JS, Electron etc if that's what someone is comfortable with and they are more mature technologies. Web applications really are the future.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  4. #44
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,853

    Re: Can anyone write an array module?

    Quote Originally Posted by yereverluvinuncleber View Post
    I am REALLY enjoying programming in VB6
    I strongly second that thought.

    I do some programming with the latest Visual Studio (VB.net, C/C++/C#), and I also do a bit of C/C++ programming with other IDEs/compilers. But, especially when firing up Visual Studio, it's a big ughhh, on my part. And firing up the VB6 IDE is just sooo easy.

    And the VB6 IDE (at least for me) is just so concise, tight, and to-the-point. And it still has great stepping and variable tracking abilities. It's just a great programming environment. I can just get so much done and much quicker than in any other programming environment.

    IMHO, that's a big part of the reason (as well as the break in backwards compatibility with .NET) that's there's still such a large VB6 community still around.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  5. #45
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: Can anyone write an array module?

    Quote Originally Posted by yereverluvinuncleber View Post
    For some reason entirely by accident I seem to have the correct skillset for the above...

    Trouble is, I am REALLY enjoying programming in VB6, more than I ever did before!
    Olaf would probably come along any minute now to say that VB6 can do web applications too and that they would only use kilobytes of bandwidth! He'd probably be right. You could go that route and never leave VB6. I think that's nuts but if it's for you, it's for you
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  6. #46
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: Can anyone write an array module?

    Quote Originally Posted by Zvoni View Post
    But that's just it (at least for me): What happened to the Standalone-EXE?
    Whatever i write in Lazarus/FreePascal, which doesn't use external dependencies, i compile to an EXE, put it on a Flashdisk, and distribute.
    Hell, i can even run it directly from the Flashdisk.
    I don't get it, None of the Windows versions of VB have been capable of creating a standalone exe. At the very least the VB runtime is required and possibly several other files depending on the program.

    Programs written in .Net require the target framework but again it is already on most systems so you can simply put an exe on a flash drive and run it from there.
    VB6 requires the runtime but it also is already on most systems so you can just run the exe on a flash drive if you like. Naturally with either of these if you include calls to other files they need to be included and While I've not used the non basic languages you refer to I am sure they also require extra files in some cases.

  7. #47
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    4,418

    Re: Can anyone write an array module?

    But that‘s the thing: if i have dependencies (say a specific library) i can either declare it as dependent (and leave it to the user to install it) or i ship it with my app.
    If license of the lib allows it, i statically link the lib into my exe, and i‘m done.

    i‘m not dependent on an external factor (read: Microsoft) to provide me the necessary platform to even just create a „Hello world“.
    and i really really don‘t miss „binary compatibility“ and that whole crap after an OS-Update
    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  8. #48
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: Can anyone write an array module?

    You know this whole line of argument is moot. I've demonstrated a couple times on these Forums that .Net 5 can create a stand alone single EXE and run it on a fresh installation of Linux. The executable is completely 100% free of any external dependencies. The VB6 compiler can't do anything like that.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  9. #49
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,219

    Re: Can anyone write an array module?

    Quote Originally Posted by PlausiblyDamp View Post
    So I am assuming you have done benchmarking and memory profiling over both versions of the code to decide if the .Net version really is too inefficient.
    Of course!
    Other than Niya, I'm not "just making stuff up on the go" -
    (to serve my plain trolling-attempts in the Sub-forum of a language I despise)

    The Linq-based Hex-serializing as posted by Niya needs ~160msec to encode the Bytes of a 2MB-JPG.

    A VB6-version (using Selects, based on an InMemory-DB) can serialize this JPG to a HexString in ~11msec.
    (that's where the "factor 15" in my earlier posting came from).

    And a straight, handwritten VB6-function (7 lines of code) can do the same thing in ~8-9msec.

    All measured on the same (modern) machine.

    @Niya
    Aside from the user-experience-aspect of a "much snappier App"...

    The serverside "CPU-load caused" is directly proportional to your monthly costs
    (when renting Server-VMs in the cloud, hosting serious Applications).

    Technologically seen, VB6 is by far the better tool (with strong advantages in several areas) -
    and potential reasons to move away from it in the longerm, are purely political - not technical ones.

    You go on endlessly about alleged "productivity-gains", but then you fail -
    in delivering a single (midsized) Project, which demonstrates these allegedly existing advantages clearly.

    Something like that (including tons of List-Manipulations via Linq) never came up "on GitHub" or elsewhere.

    If it did, we could show you how to rewrite it in less code in VB6, then offering better:
    - startup-time
    - general performance
    - less mem-consumption

    Olaf

  10. #50
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: Can anyone write an array module?

    Quote Originally Posted by Schmidt View Post
    The Linq-based Hex-serializing as posted by Niya needs ~160msec to encode the Bytes of a 2MB-JPG.
    So what? What the hell kind of cyborg supermutant are you that you could actually tell the difference between 160 milliseconds and 15 milliseconds. Literally a waste of time worrying about this.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  11. #51
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,219

    Re: Can anyone write an array module?

    Quote Originally Posted by Niya View Post
    So what? What the hell kind of cyborg supermutant are you that you could actually tell the difference between 160 milliseconds and 15 milliseconds. Literally a waste of time worrying about this.
    I've explained it already, but here again:
    The serverside "CPU-load caused" is directly proportional to your monthly costs
    (when renting Server-VMs in the cloud, hosting serious Applications).


    There's a difference, when you have to pay $300.00 per anno for your rented VM-server in the cloud,
    or $4500.00 per anno (because of .NETs inefficiency with List-Objects and LINQ).

    Olaf

  12. #52
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,458

    Re: Can anyone write an array module?

    Quote Originally Posted by Schmidt View Post
    I've explained it already, but here again:
    The serverside "CPU-load caused" is directly proportional to your monthly costs
    (when renting Server-VMs in the cloud, hosting serious Applications).


    There's a difference, when you have to pay $300.00 per anno for your rented VM-server in the cloud,
    or $4500.00 per anno (because of .NETs inefficiency with List-Objects and LINQ).

    Olaf
    In which case use the correct tool for the job...
    Code:
    Dim sw As New Stopwatch
    Dim bytes = File.ReadAllBytes("....")
    sw.Start()
    Dim res = Convert.ToBase64String(bytes)
    sw.Stop()
    Console.WriteLine(sw.ElapsedMilliseconds.ToString("#,##0.0"))
    The Base64 part clocks in at 11ms on my PC for a 3.88M file

    If you want to do something like a base 64 conversion use the built in optimised routine. If you are manipulating lists and want a convenient way to do things then a type safe list and linq will work. If performance / memory is an issue then perhaps a loop rather than linq might make sense, although depending on exactly what you are doing the difference might not make that big a difference anyway.
    Last edited by PlausiblyDamp; Oct 18th, 2021 at 05:44 PM.

  13. #53

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    Re: Can anyone write an array module?

    I use 32GB of memory, and the question now is how to increase the speed of the software as much as possible instead of saving memory. So the development tools for 64-bit programs have more advantages

  14. #54
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: Can anyone write an array module?

    Quote Originally Posted by Schmidt View Post
    There's a difference, when you have to pay $300.00 per anno for your rented VM-server in the cloud,
    or $4500.00 per anno (because of .NETs inefficiency with List-Objects and LINQ).
    So your answer to that is to use VB6, a 20 plus year piece of rusting technology that's on life support? Come on man, get real here. You can optimize performance in .Net applications as well as you could in any language. LINQ isn't about performance, it's about developer productivity. You use it when it makes sense, just like anything else.
    Last edited by Niya; Oct 18th, 2021 at 07:53 PM.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  15. #55
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,235

    Re: Can anyone write an array module?

    May the best man win - Ding, ding, seconds out. Round THREE!
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  16. #56
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,989

    Re: Can anyone write an array module?

    How did we get here AGAIN?

    Oh yeah, it's the same people.

    I'm not fan of LINQ, and never have been. It isn't necessary, but it IS powerfully useful for anybody who wants to show .NET performing slowly, because that's what LINQ does. In most cases, it doesn't matter, as Niya pointed out (and several have pointed out to me in the past), so I've modified my view: Use LINQ when performance isn't critical (and it almost never is), avoid it when it is.
    My usual boring signature: Nothing

  17. #57
    New Member
    Join Date
    Oct 2021
    Posts
    10

    Re: Can anyone write an array module?

    Quote Originally Posted by Elroy View Post
    And the VB6 IDE (at least for me) is just so concise, tight, and to-the-point.
    The one thing in Visual Studio's VB.NET that pisses me off to no end is that there isn't the "right-click --> Go to last position" option that VB6 has. So, so, so very useful when "right-click --> Go to definition" and you want to jump back to where you were just before.

  18. #58
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,120

    Re: Can anyone write an array module?

    Quote Originally Posted by HardCode.NET View Post
    The one thing in Visual Studio's VB.NET that pisses me off to no end is that there isn't the "right-click --> Go to last position" option that VB6 has. So, so, so very useful when "right-click --> Go to definition" and you want to jump back to where you were just before.
    You mean F12 and Ctrl+- do not work in VB.Net code editor?

    cheers,
    </wqw>

  19. #59
    New Member
    Join Date
    Oct 2021
    Posts
    10

    Re: Can anyone write an array module?

    Quote Originally Posted by Niya View Post
    So your answer to that is to use VB6, a 20 plus year piece of rusting technology that's on life support?
    Actually, the answer would be to use Rust
    Last edited by HardCode.NET; Oct 19th, 2021 at 11:46 AM.

  20. #60
    New Member
    Join Date
    Oct 2021
    Posts
    10

    Re: Can anyone write an array module?

    Quote Originally Posted by wqweto View Post
    You mean F12 and Ctrl+- do not work in VB.Net code editor?

    cheers,
    </wqw>
    Son of a.....

    Still, it would be nice if it was on the freakin' right-click menu like VB6.

  21. #61
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,219

    Re: Can anyone write an array module?

    Quote Originally Posted by Niya View Post
    LINQ isn't about performance, it's about developer productivity.
    Ok, let's make a simple calculation:

    Let's say (for your sake, not mine), that "thinking about - and typing a Linq-statement" saves 50% of time,
    compared to using already built-in ArrayList-methods or your own helper-functions, or plain handwritten Loops.

    So, we go with a time-reduction factor of 0.5 (I don't believe it is that high, but let's assume it for this example).

    Then we have the "amount of other code-lines" you have to write in a real-world-project...
    Let's assume a ratio of "Linq-lines" (compared to all the others one has to type)... of 1% -
    giving an additional factor of 0.01.

    Then there's the time you spend on a project, where you "don't actively type into an editor".
    At my workplace, this is a significant amount (varying between 50-70%) -
    so let's go with: another factor of (1 - 0.6) = 0.4.

    Ok, to "sum it all up" (or better, "multiply it up"), we have:
    0.5 * 0.01 * 0.4 = 0.002 = 0.2% over-all productivity-gains

    So, if you work fulltime for 5 days (a 40hour week) on a project,
    your "total prodcutivity-gains due to LINQ" in that week amount to:

    <drum-roll> ... 288 seconds!

    Way to go, ... ... or perhaps not.

    Olaf

  22. #62
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,458

    Re: Can anyone write an array module?

    Quote Originally Posted by Schmidt View Post
    Ok, let's make a simple calculation:

    Let's say (for your sake, not mine), that "thinking about - and typing a Linq-statement" saves 50% of time,
    compared to using already built-in ArrayList-methods or your own helper-functions, or plain handwritten Loops.

    So, we go with a time-reduction factor of 0.5 (I don't believe it is that high, but let's assume it for this example).

    Then we have the "amount of other code-lines" you have to write in a real-world-project...
    Let's assume a ratio of "Linq-lines" (compared to all the others one has to type)... of 1% -
    giving an additional factor of 0.01.

    Then there's the time you spend on a project, where you "don't actively type into an editor".
    At my workplace, this is a significant amount (varying between 50-70%) -
    so let's go with: another factor of (1 - 0.6) = 0.4.

    Ok, to "sum it all up" (or better, "multiply it up"), we have:
    0.5 * 0.01 * 0.4 = 0.002 = 0.2% over-all productivity-gains

    So, if you work fulltime for 5 days (a 40hour week) on a project,
    your "total prodcutivity-gains due to LINQ" in that week amount to:

    <drum-roll> ... 288 seconds!

    Way to go, ... ... or perhaps not.

    Olaf
    That might be true if productivity was only about writing code. Maintaining and fixing old code can be a substantial amount of time, Linq can make code a lot more readable compared to loops as it reads in a more natural left to right way. Linq can also provide a consistent way of dealing with differing sources - arrays, lists, databases, etc. can be processed in almost identical ways without requiring different coding approaches.

  23. #63
    Hyperactive Member
    Join Date
    May 2018
    Location
    Russia
    Posts
    317

    Re: Can anyone write an array module?

    Entisoft makes a class that does that.

    Price: $400

    Array Conversions Class

    Entisoft Tools 2.1 Object Library
    Version 2.1.1 Released 2000/05/12 07:38Re Dim Preserve Variant Cube Function
    "Re-dimension Preserve Variant Cube" Redimensions a three-dimensional array of Variants. Preserves all elements that existed both before and after the re-dimension. Re Dim Preserve Variant Matrix Function "Re-dimension Preserve Variant Matrix" Redimensions a two-dimensional array of Variants. Preserves all elements that existed both before and after the re-dimension. Re Dim Preserve Variant Vector Function "Re-dimension Preserve Variant Vector" Redimensions a one-dimensional array of Variants. Preserves all elements that existed both before and after the re-dimension. String Matrix To Variant Matrix Function Convert a String matrix into a Variant matrix. Copies each of the elements of a two-dimensional String array into a two-dimensional array of Variant values. String To Variant Matrix Function Parse a delimited string into a two-dimensional array of Variants. String To Variant Vector Function Parse a delimited string into a one-dimensional array of Variants. Parse a string representing one row of delimited text, placing each column value into one array element. String Vector To Variant Vector Function Convert a String vector into a Variant vector. Copies each of the elements of a one-dimensional String array into a one-dimensional array of Variant values. Variant Matrix Column To Vector Function Copies a Column from a two-dimensionsional Variant array into a one-dimensional array. Variant Matrix Row To Vector Function Copies a Row from a two-dimensionsional Variant array into a one-dimensional array. Variant Matrix To String Function Assembles the elements of a two-dimensional Variant array into a String. Combine elements 1..UBound, 1..UBound of vLines into a String separated by vColumnSeparator. Separators are not included when there is only one element in the dimension. Variant Matrix To String Matrix Function Convert a Variant matrix into a String matrix. Copies each of the elements of a two-dimensional Variant array into a two-dimensional array of String values. Variant Vector To Matrix Column Function Overlays a one-dimensional Variant array onto a Column of a two-dimensional Variant array. The destination array must already have been dimensioned. Variant Vector To Matrix Row Function Overlays a one-dimensional Variant array onto a Row of a two-dimensional Variant array. The destination array must already have been dimensioned. Variant Vector To String Function Assembles the elements of a one-dimensional Variant array into a String. Combine elements 1..UBound of vLines into a String separated by vColumnSeparator. Column separator is not included when there is only one element in the array. Variant Vector To String Vector Function Convert a Variant vector into a String vector. Copies each of the elements of a one-dimensional Variant array into a one-dimensional array of String values.

    Array Manipulations Class

    Entisoft Tools 2.1 Object Library
    Version 2.1.1 Released 2000/05/12 07:38
    Copy Variant Array Function Copy a Variant array to another Variant array. Source array can have 1, 2, or 3 dimensions. Copy Variant Array Direct Function Copy a Variant array to another Variant array. Source array can have 1, 2, or 3 dimensions. Copy Variant Cube Function Copy a three-dimensional Variant array to another Variant array. Copy Variant Cube Direct Function Copy a three-dimensional Variant array to another Variant array. Copy Variant Matrix Function Copy a two-dimensional Variant array to another Variant array. Copy Variant Matrix Direct Function Copy a two-dimensional Variant array to another Variant array. Copy Variant Vector Function Copy a one-dimensional Variant array to another Variant array. Copy Variant Vector Direct Function Copy a one-dimensional Variant array to another Variant array. Direct-copy version of CopyVariantVector. Offset Variant Matrix Function Copy a two-dimensional Variant array to another Variant array AND change the bounds of the array. The size of the new array will be the same but the bounds can be different. The elements are preserved but they are shifted into new positions according to the offsets. Offset Variant Vector Function Copy a one-dimensional Variant array to another Variant array AND change the bounds of the array. The size of the new array will be the same but the bounds can be different. The elements are preserved but they are shifted into new positions according to the offset. Overlay Variant Matrix Function Overlay a two-dimensional Variant array onto some part of another Variant array. Overlay Variant Vector Function Overlay a one-dimensional Variant array onto some part of another Variant array. Reverse Variant Vector Function Reverses the elements of a one-dimensional Variant array. The first element becomes the last, the last becomes the first, etc. The elements are reversed in place. Set Variant Cube Function "Set Variant Cube Element" Sets the value of an element of a three-dimensional Variant array. Will expand the array if necessary to allow the element to be set. Set Variant Matrix Function "Set Variant Matrix Element" Sets the value of an element of a two-dimensional Variant array. Will expand the array if necessary to allow the element to be set. Set Variant Vector Function "Set Variant Vector Element" Sets the value of an element of a one-dimensional Variant array. Will expand the array if necessary to allow the element to be set. Shuffle Variant Matrix Function v1.3 Bug Fix: This Function has been fixed to support the arrays containing elements of Object and DataObject type Values. Shuffle Variant Matrix Columns Function v1.3 Bug Fix: This Function has been fixed to support the arrays containing elements of Object and DataObject type Values. Shuffle Variant Matrix Rows Function v1.3 Bug Fix: This Function has been fixed to support the arrays containing elements of Object and DataObject type Values. Shuffle Variant Vector Function Shuffle the elements of a variant vector (one-dimensional array of variant values). Used by the Quick Sort subroutine to avoid the worst-case behavior of that algorithm when it must sort already-ordered arrays. v1.3 Bug Fix: This Function has been fixed to support the arrays containing elements of Object and DataObject type Values. Swap Variant Matrix Columns Function v1.3 Bug Fix: This Function has been fixed to support the arrays containing elements of Object and DataObject type Values. Swap Variant Matrix Rows Function v1.3 Bug Fix: This Function has been fixed to support the arrays containing elements of Object and DataObject type Values. Transpose Variant Matrix Function Transposes rows and columns of a two-dimensional variant array. Elements (1..UBound, 1..UBound) are transposed. Use temporary space in case To and Fm arrays are the same. A, B, C, D becomes A, E, I E, F, G, H B, F, J I, J, K, L C, G, K D, H, L See also: TransposeVariantMatrixSample Subroutine Note: Probably not worth writing a Transpose direct, since it could only directly transpose a square matrix.
    Last edited by Shaggy Hiker; Oct 19th, 2021 at 02:04 PM.

  24. #64
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,219

    Re: Can anyone write an array module?

    Quote Originally Posted by PlausiblyDamp View Post
    Maintaining and fixing old code can be a substantial amount of time,
    Linq can make code a lot more readable ...
    Even if "better readability" is true (which I doubt), then basically the same
    calculation I've made before, will apply (Linq being only present in 1% of .NET-codelines).

    Furthermore, LINQ will tempt you, to accomplish stuff "in place" -
    not thinking about DRY encapsulation in "one central, single helper-function" -
    (which then could as well contain a little "fast and generic-working" filter-loop in 3-5 extra-lines).

    Because later, when you indeed locate "a certain bug" within that little helper-function,
    you will fix it there once (affecting and fixing all the places from where you called it, in one go).

    HTH

    Great talk, now just you wait...
    ...stick around for a while longer here in this forum, and we might yet make decent devs out of you...

    Olaf

  25. #65
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: Can anyone write an array module?

    Quote Originally Posted by Schmidt View Post
    Ok, let's make a simple calculation:

    Let's say (for your sake, not mine), that "thinking about - and typing a Linq-statement" saves 50% of time,
    compared to using already built-in ArrayList-methods or your own helper-functions, or plain handwritten Loops.

    So, we go with a time-reduction factor of 0.5 (I don't believe it is that high, but let's assume it for this example).

    Then we have the "amount of other code-lines" you have to write in a real-world-project...
    Let's assume a ratio of "Linq-lines" (compared to all the others one has to type)... of 1% -
    giving an additional factor of 0.01.

    Then there's the time you spend on a project, where you "don't actively type into an editor".
    At my workplace, this is a significant amount (varying between 50-70%) -
    so let's go with: another factor of (1 - 0.6) = 0.4.

    Ok, to "sum it all up" (or better, "multiply it up"), we have:
    0.5 * 0.01 * 0.4 = 0.002 = 0.2% over-all productivity-gains

    So, if you work fulltime for 5 days (a 40hour week) on a project,
    your "total prodcutivity-gains due to LINQ" in that week amount to:

    <drum-roll> ... 288 seconds!

    Way to go, ... ... or perhaps not.

    Olaf
    You know we can actually put this to the test.....I'll get back to you on that though....
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width