|
symbol Specification SheetComputer Algebra Kit (c) 1993,00 by Comp.Alg.Objects. All Rights Reserved.
SymbolInherits from: CAObject
Class DescriptionMaturity Index : Relatively MatureFor symbols created with the factory method str:, the first character of the str of the symbol object must be a letter. Subsequent characters can be letters or digits. Whitespace or control characters are not allowed. Using the factory method chars:count:, it's possible to use arbitrary C strings as the value of the symbol; in this case Symbol just acts like a regular Objective C String class. If you intend to use the object as a mathematical symbol, it's not advised to do this as you might incorrectly interpret spaces etc. as mathematical operators.
Method typesCreationIdentityPrintingMethodsstr:+str:(STR)aStringCreates a new symbol, and sets its value to a copy of aString. Returns nil if aString is not suited as value for a symbol (when the first letter is not a letter, for instance).
chars:count:+chars:(STR)aBuffercount:(int)numCharsCreates a new symbol, and sets its value to a copy of the first numChars characters of aBuffer. For this method, there are no restrictions on the C string being used.
copy-copyReturns a new symbol object. Copies the string.
deepCopy-deepCopyEquivalent to copy.
release-releaseFrees the memory for the string value.
str- (STR)strReturns the string value of the symbol. The first character is a letter, subsequent characters can be alphanumeric.
str:-str:(STR)aStringCreates a new symbol, and sets its value to a copy of aString. Returns nil if aString is not suited as value for a symbol.
hash- (unsigned)hashReturns a hash value based upon the string.
isEqual:- (BOOL)isEqual:bReturns YES if the str's of both objects are equal.
compare:- (int)compare:bCompares the str's of both objects.
isLetter- (BOOL)isLetterWhether the symbol consists of just one character (and hence, is a letter, not a digit).
printOn:-printOn:(IOD)aFilePrints the symbol to aFile.
|