Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Boxing (computer programming)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Type helpers== Modern [[Object Pascal]] has yet another way to perform operations on simple types, close to boxing, called type helpers in [[FreePascal]] or record helpers in [[Delphi (programming language)|Delphi]] and [[FreePascal]] in Delphi mode.<br> The dialects mentioned are Object Pascal compile-to-native languages, and so miss some of the features that C# and Java can implement. Notably run-time [[type inference]] on strongly typed variables.<br> But the feature is related to boxing.<br> It allows the programmer to use constructs like <syntaxhighlight lang="pascal"> {$ifdef fpc}{$mode delphi}{$endif} uses sysutils; // this unit contains wraps for the simple types var x:integer=100; s:string; begin s:= x.ToString; writeln(s); end. </syntaxhighlight>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)