title: Short Strings in a Variant Record?
body: <p>I'd like to be able to access sections of a short string as part of a record</p>
  
  <p>Something like</p>
  
  <pre><code>TMyRecord = record
      case Boolean of
          True: 
          (
              EntireString: String[20];
          );
          False
          (
              StringStart: String[8];
              StringMiddle: String[4];
              StringEnd: String[8];
          );
  end;
  </code></pre>
  
  <p>Is this possible or would I have to declare each char individually </p>
  
  <pre><code>TMyRecord = record
      private
          Chars: Array[1..20] of Char;
          Function GetStringStart:String;
          Procedure SetStringStart(Value: String);       
      public
          Property StringStart: String read GetStringStart write SetStringStart; // Can I have properties on a record?
  end;
  
  Function GetStringStart: String;
  begin
      Result := Chars[1] + Char[2]....;
  end;
  
  Procedure SetStringStart(Value: String);   
  begin
      for i := 1 to 8 do
      begin
          Chars[i] := Value[i];
      end;
  end; 
  </code></pre>
  
  <p>Is this possible / worth the effort?</p>