Skip to content

docs: Update cosine example to pass by value#359

Merged
abmusse merged 1 commit intoIBM:masterfrom
alanseiden:patch-3
Oct 31, 2022
Merged

docs: Update cosine example to pass by value#359
abmusse merged 1 commit intoIBM:masterfrom
alanseiden:patch-3

Conversation

@alanseiden
Copy link
Contributor

This C library function, cos(), assumes pass by value, whereas XMLSERVICE defaults to pass-by-reference. If we don't specify "pass by value," we can get incorrect results, because we will be sending a pointer rather than a value. (Pass radian value 3.1459 to test.)

Signed-off-by: Alan Seiden alan@alanseiden.com

This C library function, cos(), assumes pass by value, whereas XMLSERVICE defaults to pass-by-reference. If we don't specify "pass by value," we can get incorrect results, because we will be sending a pointer rather than a value. (Pass radian value 3.1459 to test.)

Signed-off-by: Alan Seiden <alan@alanseiden.com>
@abmusse abmusse self-requested a review October 31, 2022 22:48
@abmusse abmusse changed the title add by='val' docs: Update cosine example to pass by value Oct 31, 2022
Copy link
Member

@abmusse abmusse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@abmusse abmusse merged commit 52496e1 into IBM:master Oct 31, 2022
@alanseiden alanseiden deleted the patch-3 branch November 1, 2022 00:33
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.

2 participants