valid_length_expression (name)
     char *name;
{
  return (name[1] == '\0' ||					/* ${#} */
	  ((sh_syntaxtab[(unsigned char) name[1]] & CSPECVAR) && name[2] == '\0') ||  /* special param */
	  (DIGIT (name[1]) && all_digits (name + 1)) ||	/* ${#11} */
#if defined (ARRAY_VARS)
	  valid_array_reference (name + 1, 0) ||		/* ${#a[7]} */
#endif
	  legal_identifier (name + 1));				/* ${#PS1} */
}
valid_length_expression (name)
     char *name;
{
  return (name[1] == '\0' ||					 
	  ((sh_syntaxtab[(unsigned char) name[1]] & CSPECVAR) && name[2] == '\0') ||   
	  (DIGIT (name[1]) && all_digits (name + 1)) ||	 
#if defined (ARRAY_VARS)
	  valid_array_reference (name + 1, 0) ||		 
#endif
	  legal_identifier (name + 1));				 
}