JCL Help:TJclComplex.AsString

From Project JEDI Wiki
Jump to navigationJump to search


Summary

AsString converts the value of the complex number to a string.


Pascal

 public property AsString: string;


Description

Use AsString property to obtain a string representation of the complex number formatted according to the canonical form of complex numbers in rectangular representation. FracLength property is used to determine the precision of float parts of the complex number. For example if your complex number is (5.2345355; -3.599) and FracLength=2 you will get the following string as the result of calling AsString: 5.23-3.60i Also you might use this property to assign the value of a string to the complex number object like this:
MyComplex.AsString := '-5.3453-3.543i' The string provided should represent a complex number in its canonical rectangular form like this: x+yi, where

  • and y are either positive or negative or zero floating values and i is theconstant text part. If either x or y is equal to zero, the corresponding part of the complex number can be omitted.If the object is unable to parse the string provided then an EJclMathError exception will be raised.


See Also

AsPolarString FracLength


About

Donator

Alexei Koudinov


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page