XPost: alt.comp.os.windows-11, alt.comp.os.windows-10   
   From: nospam@needed.invalid   
      
   On Sun, 10/12/2025 11:56 AM, Chris wrote:   
   > Daniel70 wrote:   
   >> On 12/10/2025 10:38 pm, MikeS wrote:   
   >>> On 12/10/2025 11:57, Daniel70 wrote:   
   >>>> On 10/10/2025 11:14 pm, Chris wrote:   
   >>>>> J. P. Gilliver wrote:   
   >>>>>> On 2025/10/10 0:34:47, JJ wrote:   
   >>>>>>> On Wed, 8 Oct 2025 11:48:06 +0100, J. P. Gilliver wrote:   
   >>>>>>>> On 2025/10/8 9:35:15, Anton Shepelev wrote:   
   >>>>>>>>>>   
   >>>>>>>>>> Throw it out from the second or higher floor.   
   >>>>>>>>   
   >>>>>>>> Is that a UK second or a US second?>   
   >>>>>>>   
   >>>>>>> Wait, what? Aren't both the same?   
   >>>>>>   
   >>>>>> Not when it comes to floors (storeys)! In British English, the   
   >>>>>> ground floor is called the ground floor, and the first floor is   
   >>>>>> upstairs (with the second floor, if there is one, above that,   
   >>>>>> and so on); in American English, the ground floor is the first   
   >>>>>> floor, upstairs is the second floor, and so on.   
   >>>>>   
   >>>>> dragging ourselves a little more on-topic; in computing terms   
   >>>>> this is the difference between 0-based and 1-based indexing.   
   >>>>> C-based languages always use 0-based indexing whereas others   
   >>>>> (like R, S) use 1-based.   
   >>>>>   
   >>>> "C-based languages" I can live with, although I've never studies   
   >>>> it/them ... but "0-based" and "1-based"??   
   >>>   
   >>> Think of fields in an array. The first field may be given the index 0   
   >>> or 1.   
   >>   
   >> Oh!! Are you talking about 2^0, 2^1, 2^2, etc?? Is that all?? Just never   
   >> heard of it expressed that way.   
   >   
   > No. An array is a structure used in programming to manage a list of   
   > variables. The list is indexed by an integer which either starts at 0 or 1   
   > depending on the programming language.   
   >   
      
    A[0] Offset 0 (32 bit integer equals 4 bytes)   
    A[1] Offset 4   
    A[2] Offset 8   
      
   Some languages start the index of the array at 1 instead. Maybe Pascal ?   
      
    A[1] Offset 0 (32 bit integer equals 4 bytes)   
    A[2] Offset 4   
    A[3] Offset 8   
      
   Both setups happen to be 12 bytes total. The first one at least,   
   is likely to be declared as having a size of three elements,   
   but their index enumeration is 0,1,2 .   
      
    Paul   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|