*scratch*

vijay's weblog

« Back to posts
  • Viewed
    times
January 26, 2011

Niue word to discover type

  • Edit
  • Delete
  • Tags
  • Autopost

Added a Niue word that will report the type of the top element. The type is returned as a string on the stack:

3 .t
.
=> int

434354543535353453453453453453 .t
.
=> bigint

( a code block is internally represented as an 
  instance of the virtual machine )
[ 3 2 + ] .t
.
=> vm

Thanks to Patrick Chapman for bringing this missing facility to my notice.

Tweet
  • 0 responses
  • Like
  • Comment