Hello, what is the proper way of setting "get()" resultx directly to a buffer? below was the only way I was able to do it, but it does seem correct. Thank you
EHcnck - Thu Nov 07 11:47:30 EST 2013 |
Re: set get() to Buffer cmdStr = (string get(commandline)) |
Re: set get() to Buffer Take a close look at the dxl reference manual get(element or option)Declaration
{string|int|bool} get(DBE
element [,int
index])
Note that the string|int|bool is not an option, it is mandatory. Should always be included. If it were optional, it would have brackets [ ]. Sometimes it's the little things that bite us. Hope this helps, Greg |
Re: set get() to Buffer llandale - Thu Nov 07 13:28:01 EST 2013 cmdStr = (string get(commandline)) thx, I tried casting initially must had the parentheses wrong. |
Re: set get() to Buffer GregM_dxler - Thu Nov 07 13:59:34 EST 2013 Take a close look at the dxl reference manual get(element or option)Declaration
{string|int|bool} get(DBE
element [,int
index])
Note that the string|int|bool is not an option, it is mandatory. Should always be included. If it were optional, it would have brackets [ ]. Sometimes it's the little things that bite us. Hope this helps, Greg I think "get(DBE)" can caste itself most of the time via context. See below. I caste it above since you can put an "int", "bool", or "string" into the Buffer so it would not know which one.
-Louie |
Re: set get() to Buffer llandale - Thu Nov 07 14:57:12 EST 2013 I think "get(DBE)" can caste itself most of the time via context. See below. I caste it above since you can put an "int", "bool", or "string" into the Buffer so it would not know which one.
-Louie Yup, I see, buffer doesn't know which type it should be using. Others, are already declared what type it is. I guess it would still be confused if you used autodeclare for the variables. Thanks for the clarification, Greg |
Re: set get() to Buffer GregM_dxler - Fri Nov 08 09:16:43 EST 2013 Yup, I see, buffer doesn't know which type it should be using. Others, are already declared what type it is. I guess it would still be confused if you used autodeclare for the variables. Thanks for the clarification, Greg Autodeclare: as useful as having a safety switch on a pistol automatically turn itself off when you pick it up. |