Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

length of an array

BravoknightBravoknight Member Posts: 35
how can i get the length and width of an array??????

Comments

  • PrzemekG_PrzemekG_ Member Posts: 595
    You can only get the lower and upper bound
    [code]
    dim x(13 to 156) as integer

    IntegerSize = 2 ' an integer is 2 bytes

    lower = lbound(x) ' = 13
    upper = ubound(x) ' = 156
    ElementCount = upper - lower + 1
    TotalArraySize = ElementCount * IntegerSize
    [/code]
  • Chris BrownChris Brown USAMember Posts: 4,624 ✭✭

    ______ | http://forcoder.org | free ebooks and video tutorials about // Visual Basic .NET Swift Scratch Assembly Objective-C PL/SQL C R Ruby Perl Delphi MATLAB Python C++ Java Visual Basic JavaScript C# Go PHP Fortran COBOL Alice D Kotlin Dart Ada Lua Lisp Transact-SQL Julia ABAP Crystal Scheme Clojure F# Logo Hack Apex Scala FoxPro Bash LabVIEW ML SAS Prolog Erlang Awk Rust VBScript // ___________

Sign In or Register to comment.