Skip to content

feat: implement intrinsic function BOOLEAN-OF-INTEGER#281

Draft
kmr-srbh wants to merge 3 commits into
OCamlPro:gitside-gnucobol-3.xfrom
kmr-srbh:intrinsic-boolean-of-integer
Draft

feat: implement intrinsic function BOOLEAN-OF-INTEGER#281
kmr-srbh wants to merge 3 commits into
OCamlPro:gitside-gnucobol-3.xfrom
kmr-srbh:intrinsic-boolean-of-integer

Conversation

@kmr-srbh

Copy link
Copy Markdown

Specification

BOOLEAN-OF-INTEGER returns a boolean item of usage bit representing the binary value
of argument-1. argument-2 specifies the length of the boolean data item that is returned.

argument-1 must be a positive integer.
argument-2 must be a positive non-zero integer

Returned value is a boolean item of usage bit that has the same bit configuration as
the binary representation of the value of argument-1, where the rightmost boolean position
is the low-order binary digit. The boolean value is zero-filled or truncated on the left, if
necessary, in order to return a boolean item whose length is specified by argument-2 in
terms of boolean positions.

Signed-off-by: Saurabh Kumar <developer.saurabh@outlook.com>
Signed-off-by: Saurabh Kumar <developer.saurabh@outlook.com>
Signed-off-by: Saurabh Kumar <developer.saurabh@outlook.com>
@kmr-srbh kmr-srbh force-pushed the intrinsic-boolean-of-integer branch from 68019e5 to bf23a4c Compare March 25, 2026 07:37
@kmr-srbh

Copy link
Copy Markdown
Author

As discussed with @GitMensch, the changes in this PR need to be added as an enhancement over the implementation of BIT-OF intrinsic, which does the same work as BOOLEAN-OF-INTEGER, but on alphanumeric literals considering full byte lengths instead of N bits. Marking this PR as draft for now.

@kmr-srbh kmr-srbh marked this pull request as draft March 26, 2026 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant