Searching \ for '[OT] Strings in VC' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=strings
Search entire site for: 'Strings in VC'.

Exact match. Not showing close matches.
PICList Thread
'[OT] Strings in VC'
2006\01\27@004616 by John Pearson

flavicon
face
Why can't I replace the text in this command with a string?

[insert("FileName", "RowNum","ColNum", "Number")]

I want to do this:

char string[] = "123";
[insert("FileName", "RowNum","ColNum", string)]

It won't work. Why?

Thanks
John

2006\01\27@005440 by Marcel Birthelmer

picon face
Is the function expecting a type String or a type char*?

John Pearson wrote:
> Why can't I replace the text in this command with a string?
>
> [insert("FileName", "RowNum","ColNum", "Number")]
>
> I want to do this:
>
> char string[] = "123";
> [insert("FileName", "RowNum","ColNum", string)]
>
> It won't work. Why?
>
> Thanks
> John
>

2006\01\27@013103 by John Pearson

flavicon
face
I don't know. There is no documentation on it, other than the first example
shown.

----- Original Message -----
From: "Marcel Birthelmer" <spam_OUTmarcelb.listsTakeThisOuTspamgmail.com>
To: "Microcontroller discussion list - Public." <.....piclistKILLspamspam@spam@mit.edu>
Sent: Thursday, January 26, 2006 9:57 PM
Subject: Re: [OT] Strings in VC


{Quote hidden}

> --

2006\01\27@021442 by Marcel Birthelmer

picon face
Look at the header file where the function is defined?

John Pearson wrote:
> I don't know. There is no documentation on it, other than the first example
> shown.
>
> {Original Message removed}

2006\01\27@022405 by Richard Prosser

picon face
On 27/01/06, John Pearson <xerospamKILLspamcmc.net> wrote:
> Why can't I replace the text in this command with a string?
>
> [insert("FileName", "RowNum","ColNum", "Number")]
>
> I want to do this:
>
> char string[] = "123";
> [insert("FileName", "RowNum","ColNum", string)]
>
> It won't work. Why?
>
> Thanks
> John
>
> -

2006\01\27@075224 by Gerhard Fiedler

picon face
John Pearson wrote:

> Why can't I replace the text in this command with a string?
>
> [insert("FileName", "RowNum","ColNum", "Number")]
>
> I want to do this:
>
> char string[] = "123";
> [insert("FileName", "RowNum","ColNum", string)]
>
> It won't work. Why?

It would help a lot if you explained a bit what "insert" you are talking
about.

It also doesn't look like C(++), with those brackets and without a
semicolon at the end... What is this?

Gerhard

2006\01\27@154056 by Robertino Benis

picon face
Hi,

What is the error you're getting (any compiler warnings)? How is insert()
declared? Insert() is from some external library, I would assume?

1) your 'string' declared&defined as you pointed out here may be too short
for a placeholder for which you're using it.
2) the problem may be that compiler put the content of the 'string'
somewhere where it is not visible inside insert(); Try putting it yourself
on the heap, with something like:
> char* string = NULL;
> string = new char[maxstringsize]; // make sure you're handling throw from
new, or check for NULL
> ..
> strcpy(string, "something"); // make sure that "something" is not too long
> insert("FileName", "RowNum", "ColNum", string);
> ...

HTH. Anyway, send more details...

Cheers.


{Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2006 , 2007 only
- Today
- New search...