Page 1 of 1

Problem with DCGET PICTURE "@Sn !"

Posted: Fri Aug 27, 2021 3:21 am
by Piotr D
A strange effect:
In the program I have like:
cVar:=SPACE(50)
@ 1,0 DCGET cVar PICTURE "@S25 !"+REPLICATE("X",49)
because I want that first letter to be capitalized.
The problem arises when I enter the 6th character with the Alt key (polish diacritics are Alt-a, Alt-c, Alt-e, Alt-n, Alt-o and Alt-z). The character always displays as a capital letter. It does not depend on the length of the variable or the GET field. This is always the case when PICTURE is like "@Sn !". This always happens at the 6th character. What could be the reason?

Regards
Piotr

Re: Problem with DCGET PICTURE "@Sn !"

Posted: Fri Aug 27, 2021 3:38 am
by Wolfgang Ciriack
What should "S25" do ?
Cant find "S" in the docs.

Re: Problem with DCGET PICTURE "@Sn !"

Posted: Fri Aug 27, 2021 4:15 am
by Piotr D
Hi,
"@Sn" i a PICTURE function, horizontal scroll of entry field when the value is longer than <n>. <n> is an integer determining the width of the entry

Piotr

Re: Problem with DCGET PICTURE "@Sn !"

Posted: Fri Aug 27, 2021 5:17 am
by Wolfgang Ciriack
Hi,
then you can try
@ 1,0 DCGET cVar PICTURE "!"+REPLICATE("X",49) GETSIZE 25
This should do the same, perhaps the undocumented picture clause "S" produces your anomality ?

Re: Problem with DCGET PICTURE "@Sn !"

Posted: Fri Aug 27, 2021 6:15 am
by Piotr D
Hi Wolfgang,
this is not UNDOCUMENTED function - see at Xbase guide (under "@...GET").

"...
Formatting functions with GET...PICTURE
Function Data type Formatting
A C Only letters are allowed
B N Displays numbers left justified
C N Displays CR (Credit) after positive numbers
D C Displays character strings in SET DATE format
K CDLN Deletes edit buffer when the first key is not a cursor key
L<c> N Fills numeric values with the character <c> from the left
R C Inserts unknown formatting characters into the display, but does not store in the variable
S<n> C Horizontal scroll of entry field when the value is longer than <n>. <n> is an integer determining the width of the entry field.
X N Displays DB (Debit) behind negative numbers
Z N Displays only blank spaces when the value is 0
( N Displays negative numbers with leading blank spaces in parentheses
) N Displays negative numbers without leading blank spaces in parentheses
$ N Places the country specific currency character in front of a number
! C Converts letter characters to upper case

Piotr

Re: Problem with DCGET PICTURE "@Sn !"

Posted: Fri Aug 27, 2021 10:42 am
by Wolfgang Ciriack
Sorry, i looked at the parameter of Transform().