Implicit type conversion: Difference between revisions

m
→‎{{header|Wren}}: Changed to Wren S/H
mNo edit summary
m (→‎{{header|Wren}}: Changed to Wren S/H)
 
Line 1,747:
 
However, you can define implicit conversions for user defined types. For example, BigInts can be generated from integral Nums or Strings and, when doing operations on BigInts, values of these types are automatically converted to BigInts so the operations can succeed.
<syntaxhighlight lang="ecmascriptwren">import "./big" for BigInt
 
var b1 = BigInt.new(32)
9,476

edits