Difference between revisions of "StrToBox"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> function StrToBox(const Str: string): TBox; </source> ==Availability== SCAR Divi 3.37 > Current ===Notes=== *Before 3.38, t...")
 
Line 16: Line 16:
 
<source lang="scar">
 
<source lang="scar">
 
begin
 
begin
   WriteLn(BoxToStr(StrToBox('1,2,3,4')));
+
   WriteLn(BoxToStr(StrToBox('1,2,3,4')));
 +
  WriteLn(BoxToStr(StrToBox('1,2 ,3,        4')));   
 +
  WriteLn(BoxToStr(StrToBox('1,2 ,3,        4)'))); 
 +
  WriteLn(BoxToStr(StrToBox('(1,2 ,3,        4)'))); 
 +
  WriteLn(BoxToStr(StrToBox('(1,2,3,4)')));
 
end.
 
end.
 
</source>
 
</source>
  
 
Output:
 
Output:
 +
(1,2,3,4)
 +
(1,2,3,4)
 +
(1,2,3,4)
 +
(1,2,3,4)
 
  (1,2,3,4)
 
  (1,2,3,4)
  

Revision as of 14:12, 26 November 2012

Definition

function StrToBox(const Str: string): TBox;

Availability

SCAR Divi 3.37 > Current

Notes

  • Before 3.38, the function had some flexibility issues with the input.

Description

Converts a given string 'Str to a TBox.

Example

begin
  WriteLn(BoxToStr(StrToBox('1,2,3,4'))); 
  WriteLn(BoxToStr(StrToBox('1,2 ,3,         4')));    
  WriteLn(BoxToStr(StrToBox('1,2 ,3,         4)')));  
  WriteLn(BoxToStr(StrToBox('(1,2 ,3,         4)')));   
  WriteLn(BoxToStr(StrToBox('(1,2,3,4)')));
end.

Output:

(1,2,3,4)
(1,2,3,4)
(1,2,3,4)
(1,2,3,4)
(1,2,3,4)

See Also