type conversion - Typed integer constant in OCaml -


आप कहते हैं कि ऐसा कुछ कोड था

  type foo_t = int64 do_something_with_foo (f : Foo_t) = (* आपकी कल्पना को छोड़ दिया *)   

और आप इसे "निरंतर" फू के साथ कॉल करना चाहते हैं, जैसे:

  do_something_with_foo 99   

आप संकलक / दुभाषिया को कैसे समझते हैं कि आपका निरंतर 99 वास्तव में एक foo_t ?

do_something_with_foo 99L का उपयोग करें। निरंतर 99 प्रकार int , 99L प्रकार int64 है।

यह कुछ नहीं है टाइप उपनाम foo_t = int64 के साथ करने के लिए जब तक foo_t की परिभाषा दिखाई देती है (अर्थात किसी युक्त मॉड्यूल के हस्ताक्षर द्वारा नकाबपोश नहीं), int64 के किसी भी मान में भी foo_t और उपाध्यक्ष।

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -