× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Also, FWIW, if you are using the C++ standard string class, for example, something like this:

  std::string myStr = "interesting stuff here";

Then you'd display it in the STRDBG debugger with:

  eval *myStr._Ptr:s


On 8/18/2021 5:22 PM, Scott Klement wrote:
Hi Justin,

How do you know you're getting only one character?   This sounds a lot like what you'd get if you tried to view them incorrectly in the debugger.

FWIW, here's a dead simple program that just prints its parameters.  I compiled it quick with CRTBNDCPP and it worked fine.

#include <stdio.h>

int main(int argc, char **argv) {

  int i;

  for (i=1; i<argc; i++) {
    printf("%s\n", argv[i]);
  }

  return 0;
}

If you are trying to view the parameters in STRDBG, try typing this at the "debug>" command line:

eval *argv[1]:s

The * dereferences the pointer, and the :s views it as a C-style string.

-SK

On 8/18/2021 4:50 PM, Justin Taylor wrote:
I'm trying to call a CPPLE program with a CL CALL command and pass in
parameter (something I've never done before).  For some reason, I'm only
getting the first character of each parameter.  I even copy-and-pasted a
sample out of the IBM reference manual, and it gives the same result.  Any
idea what I'm missing?


Reference:
Programming IBM Rational Development Studio for i ILE C/C++ Programmer's
Guide (SC09-2712-07)
Creating and Compiling Programs 45

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.