It's a funny thing about MEMOs 
Author Message
 It's a funny thing about MEMOs

From embedded code in a Legacy Report Template.

I have the following code in a program and when OPT:QFooter is a STRING it works
just great, but when OPT:QFooter is a MEMO field the IF choice is as if the memo
contains data, even when it doesn't.

IF OPT:QFooter = '' THEN
  LOC:QFooter = 'None'
ELSE
  LOC:QFooter = OPT:QFooter
END

If the code is changed to

IF LEN(CLIP(OPT:QFooter)) = 0 THEN
  LOC:QFooter = 'None'
ELSE
  LOC:QFooter = OPT:QFooter
END

then it works fine what ever OPT:QFooter is.

No prizes, but I love to know why!

Regards & TIA
Mike Renals



Tue, 01 Oct 2002 03:00:00 GMT  
 It's a funny thing about MEMOs
MEMO is fixed-length string.
Use CLIP(OPT:QFooter) with both situation.

Regards,
Ville


Quote:
> From embedded code in a Legacy Report Template.

> I have the following code in a program and when OPT:QFooter is a STRING it
works
> just great, but when OPT:QFooter is a MEMO field the IF choice is as if
the memo
> contains data, even when it doesn't.

> IF OPT:QFooter = '' THEN
>   LOC:QFooter = 'None'
> ELSE
>   LOC:QFooter = OPT:QFooter
> END

> If the code is changed to

> IF LEN(CLIP(OPT:QFooter)) = 0 THEN
>   LOC:QFooter = 'None'
> ELSE
>   LOC:QFooter = OPT:QFooter
> END

> then it works fine what ever OPT:QFooter is.

> No prizes, but I love to know why!

> Regards & TIA
> Mike Renals



Tue, 01 Oct 2002 03:00:00 GMT  
 It's a funny thing about MEMOs

Hmmm. The IF MemoField = '' works properly for me. I'm using C5b on Windows 98.
No clues.

Quote:

> From embedded code in a Legacy Report Template.

> I have the following code in a program and when OPT:QFooter is a STRING it works
> just great, but when OPT:QFooter is a MEMO field the IF choice is as if the memo
> contains data, even when it doesn't.

> IF OPT:QFooter = '' THEN
>   LOC:QFooter = 'None'
> ELSE
>   LOC:QFooter = OPT:QFooter
> END

> If the code is changed to

> IF LEN(CLIP(OPT:QFooter)) = 0 THEN
>   LOC:QFooter = 'None'
> ELSE
>   LOC:QFooter = OPT:QFooter
> END

> then it works fine what ever OPT:QFooter is.

> No prizes, but I love to know why!

> Regards & TIA
> Mike Renals



Tue, 01 Oct 2002 03:00:00 GMT  
 It's a funny thing about MEMOs
I had similar experience. It looks like it happened after I added MEMOs
to the existing file and converted it. Another weird thing is that
judging by the file size MEMOs are not compressed even though they are
supposed to be empty.

Quote:

> From embedded code in a Legacy Report Template.

> I have the following code in a program and when OPT:QFooter is a STRING it works
> just great, but when OPT:QFooter is a MEMO field the IF choice is as if the memo
> contains data, even when it doesn't.

> IF OPT:QFooter = '' THEN
>   LOC:QFooter = 'None'
> ELSE
>   LOC:QFooter = OPT:QFooter
> END

> If the code is changed to

> IF LEN(CLIP(OPT:QFooter)) = 0 THEN
>   LOC:QFooter = 'None'
> ELSE
>   LOC:QFooter = OPT:QFooter
> END

> then it works fine what ever OPT:QFooter is.

> No prizes, but I love to know why!

> Regards & TIA
> Mike Renals

--
Leonid Chudakov

Cool tools and {*filter*} Clarion examples at
http://www.*-*-*.com/


Tue, 01 Oct 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Another funny thing about GAWK

2. Another Funny Thing

3. Funny thing

4. Funny thing happening with Super Invoice

5. Funny thing about date() -

6. Funny thing about date() - ARexx 1.15

7. A funny COBOL thing I wrote

8. The Funniest thing about PEP 285

9. A funny thing about logical pathname namestrings.

10. OT a funny thing happend at work

11. A strang thing in memo field.

12. Y'all must read this it's very funny :-)

 

 
Powered by phpBB® Forum Software