user2925688
user2925688

Reputation: 217

How to get the number of elements on the data stack?

Is there a possibility to get the count of elements on the stack?

For example if the stack looks like this:

--- Data stack:
1
1
1

the result should be 3.

Upvotes: 3

Views: 85

Answers (1)

Randy Voet
Randy Voet

Reputation: 3830

This should do the trick:

datastack length

Upvotes: 2

Related Questions