on 10-07-2009 4:43 PM
I have problem.
Is possible to check that FIELD that string is "ABC" or "non-ABC"
"ABC" mean is "A-Z", "a-z" , "0-9", "~`!@#$%&*()_+|{}:"<>?,./;'[]\"
Ascii < 128
Originally 128 first characters were defined in a character set known as ASCII.
"non-ABC" is out of this ,
Ascii > 128
I check ChrW(), that formula can help me?
Pseudo Code:
if {product.prodname} ascii < 128
"english name" & product.prodname
else
"non-english name. chinese name, japan name." & product.prodname
Any example please!
many thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, is fine. Now my new problem is
Modifying a text object.
Using Format Painter to change font styles.
dynamic font styles
Format Editor
:Font:
Font: Arial x+2
http://www.scientificcomputing.com/images/0602/sc62OLS_fig1_lrg.jpg
But, would you mind to tell me,
In
Format Editor
:Font:
Font: Arial x+2
click x+2
formula. font name
enter this code, but no success work?
//stringvar x := 'Su03BCanjay';
stringvar x := {JOSX.T_SOURCE};
stringvar y := '';
numbervar i;
for i := 1 to length(x) do
(
if asc(x<i>) > 128 then
(
y := "non-english name. chinese name, japan name. " & x;
//chinese font
//http://zh.wikipedia.org/wiki/%E7%B4%B0%E6%98%8E%E9%AB%94
"MingLiU";
i := length(x) + 2;
exit for;
));
if i = length(x) + 1 then
y := "english name. " & x;
"Courier New";
y;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You cannot simply check to see if the whole string is less than ascii 128, you will have to loop through the entire string. Here is an example"
stringvar x := 'Sµanjay';
stringvar y := '';
numbervar i;
for i := 1 to length(x) do
(
if asc(x<i>) > 128 then
(
y := "non-english name. chinese name, japan name. " & x;
i := length(x) + 2;
exit for;
));
if i = length(x) + 1 then
y := "english name. " & x;
y;
If you replace X with "Sanjay" then you will get the other result since all characters are under 128
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.