Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ccall documentation #543

Closed
ViralBShah opened this issue Mar 8, 2012 · 1 comment
Closed

Update ccall documentation #543

ViralBShah opened this issue Mar 8, 2012 · 1 comment
Assignees
Labels
docs This change adds or pertains to documentation

Comments

@ViralBShah
Copy link
Member

Update ccall documentation to capture the new functionality in commit 2ba6116

  1. Conversions are inserted automatically, so you can simply pass "x,
    y, z" instead of the "int32(x), uint64(y), int32(z)" we had to use
    everywhere. Of course, this uses the convert() function. Arrays and
    byte strings can be converted to pointers.
  2. A pointer to a scalar can be passed using the syntax "&x". This is
    especially useful for calling fortran. This syntax is a pun and does
    not do the same thing as C. In particular, while it is safe for called
    functions to write through this pointer, you will not be able to see
    its changes (the variable "x" will not change). Things like &0 and
    &f(x) also work, since this is not a real address-of operator.
    Conversion also happens with &; passing &x as a Ptr{T} will first
    convert x to type T.
@ghost ghost assigned JeffBezanson Mar 8, 2012
@JeffBezanson
Copy link
Member

Done.

LilithHafner pushed a commit to LilithHafner/julia that referenced this issue Oct 11, 2021
Keno pushed a commit that referenced this issue Oct 9, 2023
Adapt to stacktrace printing changes in base and `CartesianIndices` is
no longer part of the `Iterators` module.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation
Projects
None yet
Development

No branches or pull requests

2 participants