"swzoh" <[EMAIL PROTECTED]> wrote:

>I see. However, it's confusing, especially working in conjunction with
>long and short types. 

long and shortc can't be anything but numbers, so there's no ambiguity
in the meaning of "1"

> IMHO, 2) is simpler and convenient to use than
>1), so better be changed, or at least introduce an option to switch,
>in its behavior if it doesn't require much work. What do you think?
>
>1) current behavior, assigns ascii value:
>if want to assign pure numeric value 1, then have to use "\x01" or
>esc(?"\x01",?"\"), and "" for numeric 0

>2) char assigns pure numerical value Ox00 ~ 0xFF:
>if want to assign literal (ascii) "1", then simply use 0x31

The problem is that what I see in my plugin when an argument comes in
 from PowerPro is _a string_.
There is no other data type as far as the PowerPro/plugin interface is
concerned.
So when you type 

   1

I see 

  "1"

If you type 0x31, I _also_ see   "1".  So, if I make "1" mean "integer
1", how do I allow the user to 
tell me "I what the character "1". 

I could put a modifier on the type specification:

How about typespecs can include:

"integer charc chara charn ucharn byten ucn uca char"

The postfix "a" on char or uchar would mean "interpret associated
initialising single character as an ascii character"

The postfix "n" on char or uchar would mean "interpret associated
initialising single character as numeric value"

char or uchar with no postfix will be as now, "interpret associated
initialising single character as an ascii character"


That work for you?






Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to