Results 1 to 13 of 13

Thread: Interesting Find - ByRef Mismatch - Integer vs Byte

Threaded View

  1. #11
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    10,909

    Re: Interesting Find - ByRef Mismatch - Integer vs Byte

    Quote Originally Posted by wqweto View Post
    Both don't create a Variant intermediate, that would be highly ineffective language construct. CInt is not a regular function but a type conversion function and it's even color coded in the IDE as a statement (not regular function).

    cheers,
    </wqw>
    But Wqweto, I only see two possibilities for getting data (arguments) into the CInt library function: 1) there are actually separate library entry points for each argument type you may pass to CInt, and the compiler sorts this out; or 2) the argument is passed into CInt in some kind of way that the library can identify what kind of variable it is ... and that's almost the definition of a Variant.

    Just saying,
    Elroy

    EDIT1: Wait, you're saying that the compiler just puts inline code in wherever a CInt is used?

    EDIT2: And, if that's true, that's interesting because CInt still works with an explicit Variant argument, where it may not even know the data type it's converting.
    Last edited by Elroy; Nov 19th, 2018 at 11:33 AM.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width