anchor.diff:    end if
   
     do i=1,nSplit
  -    ilm0(i) = lnSplit(i)
  -  end do
  -
  -  do i=1,40
  -
  -    if(ilm0(i) == " ") cycle
  -    if(ilm0(i) == geom_go) then
  +
  +    if(len_trim(lnSplit(1)) > mNameLen) then
  +      write(lout,"(a)") "GEOMETRY> ERROR Structure element name cannot have more than ",mNameLen," characters."
  +      iErr = .true.
  +      return
  +    end if
  +
  +    if(lnSplit(i) == " ") cycle
  +    if(lnSplit(i) == geom_go) then
         kanf = geom_nStru + 1
         cycle
       end if
  
positive.code:   ! used in the structure to enable 6D tracking using the parameters
    ! from the SYNC block.
    if(sixin_ncy2 == 0) then
      geom_nSing             = geom_nSing + 1
      il                     = geom_nSing
      bez(geom_nSing)        = geom_cavity
      geom_bez0(geom_nSing)  = geom_cavity
      kp(geom_nSing)         = 6
    else
      il         = geom_nSing
      geom_nSing = geom_nSing + 1
  
negative.code:     return
    end if
  
    if(len_trim(lnSplit(1)) > mNameLen .or. len_trim(lnSplit(2)) > mNameLen) then
      write(lout,"(a)") "GEOMETRY> ERROR Structure element names in columns 1 and 2 cannot have more than ",mNameLen," characters."
      iErr = .true.
      return
    end if
  
    geom_nStru = geom_nStru + 1
    if(geom_nStru > nblz-3) then
      call expand_arrays(nele,npart,nblz+1000,nblo)
    end if
  
    bezs(geom_nStru) = trim(lnSplit(1))
    call chr_cast(lnSplit(3), elpos(geom_nStru), cErr)
  
    singID = -1
  