From 5befb4911b2d6ae59b3c2388e15af659257f158a Mon Sep 17 00:00:00 2001 From: Alan Seiden Date: Mon, 31 Oct 2022 14:40:50 -0400 Subject: [PATCH] add by='val' 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 --- docs/examples/cosine.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/examples/cosine.js b/docs/examples/cosine.js index aaa7547..dd9a8b4 100644 --- a/docs/examples/cosine.js +++ b/docs/examples/cosine.js @@ -8,7 +8,7 @@ const conn = new Connection({ const program = new ProgramCall('QC2UTIL2', { lib: 'QSYS', func: 'cos' }); -program.addParam({ type: '8f', value: '0' }); +program.addParam({ type: '8f', value: '0', by: 'val' }); program.addReturn({ type: '8f', value: '' }); conn.add(program);