DataBasic Reference > Statements and Intrinsic Functions > N > NEGS Function

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

Reality V15.0 ()

NEGS Function (DataBasic) (m618703+negs_f.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

NEGS Function

Negates the elements in a dynamic array.

Syntax

NEGS(dynArray)

Syntax Elements

dynArray A DataBasic expression that evaluates to a dynamic array.

Return Value

A dynamic array with the same structure as dynArray, but with each numeric value replaced by its negated value. Positive values become negative, and vice versa. Zeros are unchanged.

Notes

Example

ARY = 1.5:@AM:-2.5:@AM:3.5:@AM:"Fred":@VM:7:@SVM:-20:@AM
NEWARY = NEGS(ARY)

Sets NEWARY to "-1.5AM2.5AM-3.5AM0VM-7SVM20AM" and generates run-time error B16.

RealityV15.0Comment on this topic