[AccessD] Brain Fart regarding arrays

Rocky Smolin rockysmolin2 at gmail.com
Sun Jan 8 00:23:54 CST 2023


I used it first in Fortran II in 1964. I, J, K, L, M, N  were (if memory
serves)reserved integer variable names. My first language was IITRAN ( IITRAN
- Wikipedia <https://en.wikipedia.org/wiki/IITRAN>).  Illinois Institute of
Technology was where I had to go to program a computer. I was 16. I think
the integer variables were the same in IITRAN.

I think in later versions of Fortran any variable name beginning with one
of those letters were compiled as integer values.


Do  I = 1,  N, 2

End Do

r

P.S. Next stumper - The acronym CCW just came to mind. Do you know what
that one was? What its function was?  Hint: you used BAL to manipulate it.

On Sat, Jan 7, 2023 at 8:16 PM Arthur Fuller <fuller.artful at gmail.com>
wrote:

> Rocky,
>
> The use of i and j goes back at least as far as the K&R first edition.
> Prior to that I have no idea. The prefix is pretty much a BASIC and VBA
> thing, so far as I know. A lot of the C and C++ code I read doesn't bother
> with either prefix or suffix to indicate type. If there's ever a doubt, you
> can always look at the Declare statements, I guess is their thinking. I
> have come to prefer the C-style, which also eliminates the "As" stupid word
> -- except when it's used in a cast.
>
> But ultimately, when in Spain...
>
> On Sat, Jan 7, 2023 at 10:28 PM Rocky Smolin <rockysmolin2 at gmail.com>
> wrote:
>
> > Old guys quiz:
> >
> > I see you are using (like me) intI and intJ for counters in a For Next
> > loop.
> >
> > Who knows the etymology intI and intJ?
> >
> > r
> >
> > On Sat, Jan 7, 2023 at 6:40 PM jack drawbridge <jackandpat.d at gmail.com>
> > wrote:
> >
> > > Arthur,
> > >
> > > Here's a method that may satisfy your requirement. It's been a long
> time
> > > since I did multi-dimension anything.
> > > Hope it's helpful.
> > >
> > > '=====arthur fuller
> > >
> > >
> > > Sub Fill_2DArray()
> > >     Dim intI As Integer, intJ As Integer
> > >     Dim Arr1 As Variant, arr2 As Variant
> > >     Arr1 = Array(0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)
> > >     arr2 = Array(0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)
> > >     Dim TwoD(0 To 1, 0 To 12) As Integer
> > >
> > >     ' Fill array with values.
> > >     For intI = 0 To 1
> > >         For intJ = 0 To 12
> > >             Select Case intI
> > >                 Case 0
> > >                     TwoD(intI, intJ) = Arr1(intJ)
> > >                 Case 1
> > >                     TwoD(intI, intJ) = arr2(intJ)
> > >             End Select
> > >             Debug.Print "TwoD(" & intI & " , " & intJ & ")  is " &
> > > TwoD(intI, intJ)
> > >         Next intJ
> > >         Debug.Print
> > >     Next intI
> > > End Sub
> > >
> > > On Sat, Jan 7, 2023 at 8:54 PM Arthur Fuller <fuller.artful at gmail.com>
> > > wrote:
> > >
> > > > I can't remember at the moment how to populate a 2D array. I know
> what
> > I
> > > > want: 13 x 2:
> > > >
> > > > Row 1: (0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)
> > > > Row 2: (0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)
> > > >
> > > > I seem to recall being able to populate it in two steps, passing the
> > rows
> > > > as described above, but I can't recall the syntax. I've been spending
> > too
> > > > much time in C and C++ and have forgotten my VBA. 🙁
> > > >
> > > > --
> > > > Arthur
> > > > --
> > > > AccessD mailing list
> > > > AccessD at databaseadvisors.com
> > > > https://databaseadvisors.com/mailman/listinfo/accessd
> > > > Website: http://www.databaseadvisors.com
> > > >
> > > --
> > > AccessD mailing list
> > > AccessD at databaseadvisors.com
> > > https://databaseadvisors.com/mailman/listinfo/accessd
> > > Website: http://www.databaseadvisors.com
> > >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > https://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
>
>
> --
> Arthur
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


More information about the AccessD mailing list