Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
00460640
Commit
00460640
authored
28 years ago
by
Fredrik Hübinette (Hubbe)
Browse files
Options
Downloads
Patches
Plain Diff
operator overloading added
Rev: doc/lpc/cast:1.2
parent
9caa732b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/lpc/cast
+15
-0
15 additions, 0 deletions
doc/lpc/cast
with
15 additions
and
0 deletions
doc/lpc/cast
+
15
−
0
View file @
00460640
...
...
@@ -21,8 +21,23 @@ DESCRIPTION
given by that string. It will then put the program in a chache in
case you cast the same string to a program again later.
Castring from string to object will call cast_to_object in the
master object and request an object to return. The standard master
object will consider the string a file name, cast it to a program
and return a clone of that file. If the same cast is attempted again
later, the _same_ object will be returned.
When casting an object, the method o->cast will be called with a string
with the name of the type as argument. o->cast can then return any
value.
In all other cases, casts are just compiler hints.
EXAMPLES
(program)"/precompiled/file" // returns the file program
(object)"/precompiled/file" // returns a clone of the file program
(int)(object)"/precompiled/mpz" // returns 0
KEYWORDS
lpc
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment