Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 511111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:10:59+00:00 2026-05-13T07:10:59+00:00

Many external declarations in the OCaml standard library have a % at the beginning

  • 0

Many external declarations in the OCaml standard library have a % at the beginning of the function name, such as the definition of int_of_float:

external int_of_float : float -> int = "%intoffloat"

What does the ‘%’ mean?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:10:59+00:00Added an answer on May 13, 2026 at 7:10 am

    There’s a lot of %foo special primitives hiding in the compiler. I think the best list is available in bytecomp/translcore.ml, in the ocaml compiler sources. Let’s see how many I can list here:

    • Comparisons: %equal, %notequal, %lessthan, %greaterthan, %lessequal, %greaterequal, %compare

    These comparisons have specialized versions for int, float, string, nativeint, int32 and int64, and will auto-specialize if the types are known at compile-time.

    • Other primitives: %identity, %ignore, %field0, %field1, %setfield0, %makeblock, %makemutable, %raise, %incr, %decr, %seqand, %seqor, %boolnot
    • Int ops: %negint, %succint, %predint, %addint, %subint, %mulint, %divint, %modint, %andint, %orint, %xorint, %lslint, %lsrint, %asrint
    • Int comparators (??): %eq, %noteq, %ltint, %leint, %gtint, %geint
    • Float ops: %intoffloat, %floatofint, %negfloat, %absfloat, %addfloat, %subfloat, %mulfloat, %divfloat
    • Float comparators: %eqfloat, %noteqfloat, %ltfloat, %lefloat, %gtfloat, %gefloat
    • String ops: %string_length, %string_safe_get, %string_safe_set, %string_unsafe_get, %string_unsafe_set
    • Array ops: %array_length, %array_safe_get, %array_safe_set, %array_unsafe_get, %array_unsafe_set
    • Object manipulation: %obj_size, %obj_field, %obj_set_field, %obj_is_int
    • Lazy: %lazy_force
    • Nativeint,int32,int64 ops: %{nativeint,int32,int64}: _of_int, _to_int, _neg, _add, _sub, _mul, _div, _mod, _and, _or, _xor, _lsl, _lsr, _asr
    • Int conversions: %nativeint_{of,to}_int32, int64_{of,to}_int32, int64_{of,to}_nativeint
    • Bigarray operations: %caml_ba_ref_{1,2,3}, %caml_ba_set_{1,2,3}, %caml_ba_unsafe_ref_{1,2,3}, %caml_ba_unsafe_set_{1,2,3}
    • Object Oriented: %send, %sendself, %sendcache

    That’s all I can find.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have string containing many of HTML tag of exactly that construction: Hello <img
I used to work with math.h without any problem. Now, I use an external
My target is to open many .csv files, each of them in a new
I wanted to use the INCLUDES script that will grab external html and place
HI, guys. I am developing a GUI to configure and call several external programs
We have a Windows application that can use multiple PCI adapters. These adapters all
I am Working on a cs5 as3 project and in that project i have
Background I am currently refactoring a legacy .NET application. The application performs complex mathematical
Some years ago I built an Excel file for my colleagues that displays lots
I need some ideas to make my code a bit cleaner for a pretty

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.