Cursus Raku / Essentiëlen / Datentyp-conversie / Introspectie met WHAT
Quiz: Wat geeft WHAT terug?
Selecteer het juiste resultaat van het aanroepen van de WHAT methode.
| (Str) | 'String'.WHAT retourneert (: (Int), (Rat), (Num), (Str) :) |
|
| (Int) | 500.WHAT retourneert (: (Int), (Rat), (Num), (Str) :) |
|
| (Rat) | 3.14.WHAT retourneert (: (Int), (Rat), (Num), (Str) :) |
Twee punten moeten je niet verwarren. |
| (Num) | pi.WHAT retourneert (: (Int), (Rat), (Num), (Str) :) |
pi is per definitie Num. |
| (Int) | (-10).WHAT retourneert (: (Int), (Rat), (Num), (Str) :) |
|
| (Int) | (+10).WHAT retourneert (: (Int), (Rat), (Num), (Str) :) |
|
| (Rat) | (-1/2).WHAT retourneert (: (Int), (Rat), (Num), (Str) :) |
|
| (Int) | ('3' + '4').WHAT retourneert (: (Int), (Rat), (Num), (Str) :) |
'3' + '4' doet numerieke optelling, dus het resultaat is een integer. |
| (Str) | ('3' ~ '4').WHAT retourneert (: (Int), (Rat), (Num), (Str) :) |
String concatenatie geeft een string. |
Cursusnavigatie
← Datentyp-conversie | Datentyp-conversie / Typen converteren met type coercie methoden →
💪 Or jump directly to the exercises to this section.
Deze pagina is automatisch vertaald met ChatGPT 4o. Originele Engelse tekst.
Vertalingen van deze pagina: English • Deutsch • Español • Italiano • Latviešu • Nederlands • Български • Русский • Українська