Re: [Oorexx-devel] Question 1 ad CString(): not leaving \n untouched?

2009-08-02 Thread Rony G. Flatscher
Hi Mark,
 This is surely due to whatever you are using to display your string.
  Using the same Rexx code as in my other post, here is what I get:
   
... cut ...
 Which is exactly correct.  This is the C++ code:
   
... cut ...

Again, thank you very much for looking into it. Went back into the
native code and executing SAY-statements via it, and the newline worked!

---

In order to figure out what I have been seeing ('?' for newline chars),
I was able to trace this down to where the interpreter reports an error
and the supplied error string contains a newline char. E.g.

errorString=This is an error || 0ax || and this the second line
of that error.
raise syntax 98.900 array (errorString)

Running the above Rexx program then yields:

E:\testmakeError.rex
 3 *-* raise syntax 98.900 array (errorString)
Error 98 running E:\test\makeError.rex line 3:  Execution error
Error 98.900:  This is an error?and this the second line of that error.
  

As you can see the line reading Error 98.900 displays '?' instead of
breaking the line at that position.

The BSF4Rexx support will create rather well documented error messages,
where lines need to be split up in order to be easily readable.
(Therefore newline characters are part of the error message.)

As far as I recall this was not the case with 3.2 or earlier versions of
ooRexx, such that I will file a bug for it.

Regards,

---rony


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Question 1 ad CString(): not leaving \n untouched?

2009-08-02 Thread Mark Miesfeld
On Sun, Aug 2, 2009 at 1:47 PM, Rony G.
Flatscherrony.flatsc...@wu-wien.ac.at wrote:

 In order to figure out what I have been seeing ('?' for newline chars), I
 was able to trace this down to where the interpreter reports an error and
 the supplied error string contains a newline char. E.g.

 errorString=This is an error || 0ax || and this the second line of that
 error.
 raise syntax 98.900 array (errorString)

 Running the above Rexx program then yields:

 E:\testmakeError.rex
  3 *-* raise syntax 98.900 array (errorString)
 Error 98 running E:\test\makeError.rex line 3:  Execution error
 Error 98.900:  This is an error?and this the second line of that error.


 As you can see the line reading Error 98.900 displays '?' instead of
 breaking the line at that position.

 The BSF4Rexx support will create rather well documented error messages,
 where lines need to be split up in order to be easily readable. (Therefore
 newline characters are part of the error message.)

 As far as I recall this was not the case with 3.2 or earlier versions of
 ooRexx, such that I will file a bug for it.

You should try it on 3.2 or earlier.  My recollection is that it has
always been this way.  Because I have tried in the past to put new
lines in error messages.

If it has always been this way, then you would need to open an
enhancement instead of a bug.  (My memory is not always the best
however.)

--
Mark Miesfeld

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Question 1 ad CString(): not leaving \n untouched?

2009-08-02 Thread Rony G. Flatscher

 As you can see the line reading Error 98.900 displays '?' instead of
 breaking the line at that position.

 The BSF4Rexx support will create rather well documented error messages,
 where lines need to be split up in order to be easily readable. (Therefore
 newline characters are part of the error message.)

 As far as I recall this was not the case with 3.2 or earlier versions of
 ooRexx, such that I will file a bug for it.
 

 You should try it on 3.2 or earlier.  My recollection is that it has
 always been this way.  Because I have tried in the past to put new
 lines in error messages.

 If it has always been this way, then you would need to open an
 enhancement instead of a bug.  (My memory is not always the best
 however.)
   
Hmm, already filed a bug.

Will try it on 3.2 to be sure and may reclassify it to a RFE instead.

---rony
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Question 1 ad CString(): not leaving \n untouched?

2009-08-01 Thread Mark Miesfeld
On Sat, Aug 1, 2009 at 8:16 AM, Rony G.
Flatscherrony.flatsc...@wu-wien.ac.at wrote:

 If a some const *char string contains the LF character (\n, 0x0a, 0d10)
 and one uses CString(str) to create a Rexx string, then say'ing that
 Rexx string would not cause a line break at the \n-character, rather a
 question mark (?) is displayed instead.

Rony,

This is surely due to whatever you are using to display your string.
 Using the same Rexx code as in my other post, here is what I get:

Got retStr: This is my
string
Length: 17
char at 1 in decimal: 84
char at 2 in decimal: 104
char at 3 in decimal: 105
char at 4 in decimal: 115
char at 5 in decimal: 32
char at 6 in decimal: 105
char at 7 in decimal: 115
char at 8 in decimal: 32
char at 9 in decimal: 109
char at 10 in decimal: 121
char at 11 in decimal: 10
char at 12 in decimal: 115
char at 13 in decimal: 116
char at 14 in decimal: 114
char at 15 in decimal: 105
char at 16 in decimal: 110
char at 17 in decimal: 103

Which is exactly correct.  This is the C++ code:

RexxMethod1(RexxStringObject, bc_test, RexxObjectPtr, obj)
{
char *str = This is my\nstring;

RexxStringObject result = context-CString(str);
return result;
}


--
Mark Miesfeld

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel