Skip to main content
"the other way" means "in reverse" – I wasn't looking for alternate methods.
Source Link
digitalis_
  • 231
  • 1
  • 9

GolfScript automatically coerces values, according to the following ‘priority’ sequence:

integer → array → string → block

(listed from lowest to highest.)

This means that "1"7+ leaves the string "17" on the stack (and not 8), because strings have a higher priority than integers.

[To those GolfScript veterans – apologies for insulting your respective intelligences.]

How would it be possible to do this the other way? That is, to coerce a string into
an an integer
?

GolfScript automatically coerces values, according to the following ‘priority’ sequence:

integer → array → string → block

(listed from lowest to highest.)

This means that "1"7+ leaves the string "17" on the stack (and not 8), because strings have a higher priority than integers.

[To those GolfScript veterans – apologies for insulting your respective intelligences.]

How would it be possible to do this the other way? That is, to coerce a string into
an integer
?

GolfScript automatically coerces values, according to the following ‘priority’ sequence:

integer → array → string → block

(listed from lowest to highest.)

This means that "1"7+ leaves the string "17" on the stack (and not 8), because strings have a higher priority than integers.

[To those GolfScript veterans – apologies for insulting your respective intelligences.]

How would it be possible to do this the other way? That is, to coerce a string into an integer?

Rollback to Revision 1
Source Link
digitalis_
  • 231
  • 1
  • 9

GolfScript automatically coerces values, according to the following ‘priority’ sequence:

integer → array → string → block

(listed from lowest to highest.)

This means that "1"7+ leaves the string "17" on the stack (and not 8), because strings have a higher priority than integers.

[To those GolfScript veterans – apologies for insulting your respective intelligences.]

How would it be possible to do this anythe other (hopefully) shorter way? That is, to coerce a string into
an integer
?

GolfScript automatically coerces values, according to the following ‘priority’ sequence:

integer → array → string → block

(listed from lowest to highest.)

This means that "1"7+ leaves the string "17" on the stack (and not 8), because strings have a higher priority than integers.

[To those GolfScript veterans – apologies for insulting your respective intelligences.]

How would it be possible to do this any other (hopefully) shorter way? That is, to coerce a string into
an integer
?

GolfScript automatically coerces values, according to the following ‘priority’ sequence:

integer → array → string → block

(listed from lowest to highest.)

This means that "1"7+ leaves the string "17" on the stack (and not 8), because strings have a higher priority than integers.

[To those GolfScript veterans – apologies for insulting your respective intelligences.]

How would it be possible to do this the other way? That is, to coerce a string into
an integer
?

added 20 characters in body; edited tags
Source Link
Riker
  • 7.9k
  • 4
  • 39
  • 73

GolfScript automatically coerces values, according to the following ‘priority’ sequence:

integer → array → string → block

(listed from lowest to highest.)

This means that "1"7+ leaves the string "17" on the stack (and not 8), because strings have a higher priority than integers.

[To those GolfScript veterans – apologies for insulting your respective intelligences.]

How would it be possible to do this theany other (hopefully) shorter way? That is, to coerce a string into
an integer
?

GolfScript automatically coerces values, according to the following ‘priority’ sequence:

integer → array → string → block

(listed from lowest to highest.)

This means that "1"7+ leaves the string "17" on the stack (and not 8), because strings have a higher priority than integers.

[To those GolfScript veterans – apologies for insulting your respective intelligences.]

How would it be possible to do this the other way? That is, to coerce a string into
an integer
?

GolfScript automatically coerces values, according to the following ‘priority’ sequence:

integer → array → string → block

(listed from lowest to highest.)

This means that "1"7+ leaves the string "17" on the stack (and not 8), because strings have a higher priority than integers.

[To those GolfScript veterans – apologies for insulting your respective intelligences.]

How would it be possible to do this any other (hopefully) shorter way? That is, to coerce a string into
an integer
?

Source Link
digitalis_
  • 231
  • 1
  • 9
Loading