These forums are CLOSED. Please visit the new forums HERE
Conversion between data. |
|
|
LIO Diesel
Registered User
Join date: 2 Sep 2008
Posts: 28
|
01-23-2009 05:06
HI,
|
|
Yingzi Xue
Registered User
Join date: 11 Jun 2008
Posts: 144
|
01-23-2009 05:41
I keep wondering why there are posts like this when documentation is readily available on wiki.secondlife.com *sigh*. What you want to do is called type-casting.
myinteger = (integer)mystring; mystring = (string)myfloat; myfloat = (float)mystring; |
|
LIO Diesel
Registered User
Join date: 2 Sep 2008
Posts: 28
|
01-23-2009 05:46
If it is in the wiki.secondlife.com, kindly you please mention the exact link, rather then cursing.
Thanks |
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
01-23-2009 06:25
http://lslwiki.net/lslwiki/wakka.php?wakka=Typecast. It really isn't that hard to find in the wiki.
|
|
Winter Seale
Registered User
Join date: 27 Dec 2006
Posts: 30
|
01-23-2009 13:49
In their defense, if you're coming from a dynamically typed language with implicit type conversion, or a non-strictly typed language where typecasting doesn't do type conversion (ie C), it might not be obvious to look under typecasting. =p
_____________________
~~ Winter Seale ~~ http://winterseale.com/ ~~
|
|
Scott Savira
Not Scott Saliva
Join date: 10 Aug 2008
Posts: 357
|
01-23-2009 15:00
...or if you're not a programmer to begin you you've probably never heard of typecasting.
![]() |
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
01-23-2009 16:09
Or if you are a complete and utter dumb ass just like I was when I first started scripting here
![]() _____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum |
|
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
|
01-23-2009 16:23
i found it wiki within hours after i needed it
the lsl scripting community has always been a shining star in regards to giving useful help, no matter how redundant then i see a post like this, in which a 6 month old decides be a huffy puffy, as if anything on the SL website is in plain sight, and i start to wonder when the "you suck, give up" post's are going to show up, like in most scripting "communities" if you FEEL compelled to respond to a post like this, could you hold your sigh's, and attitudes until after the fact, all you managed to do is embarrass the op, and possibly confuse them more by posting 2 totally unrelated url's to "THE WIKI" i hope you two feel better about yourselves, cause thats what SL is all about, confusion and public humiliation |
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
01-23-2009 16:35
Yeah, all of that is true. We all have to start somewhere, and it isn't fair to nail a newbie for being a newbie. On the other hand, if I were looking for an answer to a basic question like this, my first impulse would be to see if I can consult a nice reference on line. We actually have two of them. If you go to the LSL wiki, there's a pretty obvious link labelled "Types." It's doubly obvious because it lists the various available data types in LSL. So you click on it and navigate to http://lslwiki.net/lslwiki/wakka.php?wakka=types. When you get there, you don't have to read very far before you see the sentence, "To convert between different types of values, use typecasting." The word "typecasting" is a link to the web page I cited in my post above.
Frankly, I don't think it's too much to expect anyone to do that much very simple research. Having said that, now, I find it awkward to discover that you CAN'T find the same information by poking around in the LSL Portal http://wiki.secondlife.com/wiki/LSL_Portal. It really ought to be there. Because it's not, I apologize to the OP, who just might have gone looking in a logical but inexplicably wrong place. I also apologize for what probably felt like a brusque tone in my post. I should know better. |
|
Klug Kuhn
Registered User
Join date: 7 Sep 2007
Posts: 126
|
01-23-2009 16:48
Indeed, this
my_integer = (integer)my_string; conversion was complete new to me before i headed LSL. It's very handy but has kinda odd behavior since what there to do is to "force" a type to another and could end up something don't quite as expected .. |
|
Yingzi Xue
Registered User
Join date: 11 Jun 2008
Posts: 144
|
01-23-2009 17:56
i found it wiki within hours after i needed it the lsl scripting community has always been a shining star in regards to giving useful help, no matter how redundant then i see a post like this, in which a 6 month old decides be a huffy puffy, as if anything on the SL website is in plain sight, and i start to wonder when the "you suck, give up" post's are going to show up, like in most scripting "communities" if you FEEL compelled to respond to a post like this, could you hold your sigh's, and attitudes until after the fact, all you managed to do is embarrass the op, and possibly confuse them more by posting 2 totally unrelated url's to "THE WIKI" i hope you two feel better about yourselves, cause thats what SL is all about, confusion and public humiliation I don't feel my post was huffy puffy at all. The fact that the OP knows what a string, an integer and a float is tells me they're at least somewhat versed in the basics. If you look up "string" on wiki.secondlife.com you find a reference to typecasting a string. You can't get much more plain sight than that. Everywhere you look in this forum you see references to the wiki. You can also find countless typecasting examples. As for avatar age, it's irrelevant. If anything, I think your post was even more huffy than I managed to be. |
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
01-23-2009 18:17
I don't feel my post was huffy puffy at all. The fact that the OP knows what a string, an integer and a float is tells me they're at least somewhat versed in the basics. If you look up "string" on wiki.secondlife.com you find a reference to typecasting a string. You can't get much more plain sight than that. Everywhere you look in this forum you see references to the wiki. You can also find countless typecasting examples. As for avatar age, it's irrelevant. If anything, I think your post was even more huffy than I managed to be. Well good for you and glad you think it should all be that obvious. Now as pointed out already, we help people. As also pointed out, there are way too many of us oldbies here who will not allow this forum to be overtaken by stick up their butt programmers who think that everything should be obvious. If you think a question is beneath your skill level then just don't answer it and leave it to us and you can go back to playing on one of the "serious" coding forums where they answer every noob question in such a way as to demonstrate their superiority and make the noob feel like crap. You really need to give careful thought to any replies you are formulating now. We have been here for years now and we have very long memories. If you decide to really help and give thoughtful answers to people who need some help or even a little encouragement every now and then when someone has been busting their butt for hours trying to figure out something for themselves, then welcome aboard and glad to meet you. _____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum |
|
Yingzi Xue
Registered User
Join date: 11 Jun 2008
Posts: 144
|
01-23-2009 19:08
Well good for you and glad you think it should all be that obvious. Now as pointed out already, we help people. As also pointed out, there are way too many of us oldbies here who will not allow this forum to be overtaken by stick up their butt programmers who think that everything should be obvious. If you think a question is beneath your skill level then just don't answer it and leave it to us and you can go back to playing on one of the "serious" coding forums where they answer every noob question in such a way as to demonstrate their superiority and make the noob feel like crap. You really need to give careful thought to any replies you are formulating now. We have been here for years now and we have very long memories. If you decide to really help and give thoughtful answers to people who need some help or even a little encouragement every now and then when someone has been busting their butt for hours trying to figure out something for themselves, then welcome aboard and glad to meet you. I believe I've helped quite a bit so far, but I'll let my posts speak for themselves. I have no idea what it's like on coding forums because I don't frequent them, nor do I care to. I'm here to learn, just like the next person and I help when I can. I don't have programmer's ego (some of which I've seen on this forum from the veterans), I just do it as a hobby and enjoy it. I do want to make sure that the gist behind my original post is clear. I'm all for helping people that help themselves. I'll leave it at that. |
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
01-23-2009 19:22
pi
![]() |
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
01-23-2009 19:27
I believe I've helped quite a bit so far, but I'll let my posts speak for themselves. I have no idea what it's like on coding forums because I don't frequent them, nor do I care to. I'm here to learn, just like the next person and I help when I can. I don't have programmer's ego (some of which I've seen on this forum from the veterans), I just do it as a hobby and enjoy it. I do want to make sure that the gist behind my original post is clear. I'm all for helping people that help themselves. I'll leave it at that. No problem and apologies then. But also remember that there are people who have been here for years that do not even know there is a wiki, nonetheless a wiki that is devoted to LSL. Actually there are many who have no idea that they can even access the forum now because that it was limited to payment on file accounts till a few months ago. There are others who have been around SL for quite a while and have eventually mastered something like building or textures and are looking for something new like scripting. Texturing, Animations, Building etc do not have anything comparable to the LSL wiki so we can not anticipate that people asking questions are aware of all of the resources that are available. _____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum |
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
01-23-2009 20:05
pi ![]() In other words: on the one hand there ARE stickies at the top of this forum which really anyone who has found the forum and feels tempted to post SHOULD read first, but on the other hand we SHOULD really try to keep a helpful tone. Why not just a reference to the stickies, or to the resources directly? The added comments 1.) are kinds mean, and 2.) waste keystrokes. ![]() |
|
Lazink Maeterlinck
Registered User
Join date: 8 Nov 2005
Posts: 332
|
01-23-2009 21:08
One of the worst things I see is when someone asks a question, I usually assume they have looked at the wiki, and either it wasn't helpful (I've had it happen to me) or it was confusing (had that happen to me too). Pointing someone to the wiki is a good thing, but sometimes, the explinations can be gobletie gook to someone without a CS background, or experience.
|
|
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
|
01-23-2009 21:23
As for avatar age, it's irrelevant. If anything, I think your post was even more huffy than I managed to be. for those who know me, or about me, i am about to do something totally unprecedented while being called back on a forum breathe, let that 3/4 page quote a thon pass in my mind and those who do not (ie YX) [humor] *sigh* OMG seriously all you have to do is hit search and read tru a sea of crap that may or may not be totally relevant, just to see how much of a huffy bastage i CAN be, but never (that i remember) in a scripting question thread or if you feel brave enough you could dare ask, but that might make you feel bad enough to remove your post and vanish forever gah! [/humor] I'm all for helping people that help themselves. I'll leave it at that. yea, thats how it starts im done, thx |
|
Yingzi Xue
Registered User
Join date: 11 Jun 2008
Posts: 144
|
01-24-2009 04:27
I would like to apologize for the tone of my original post and the uproar it brought to this thread. We got completely off-topic, which isn't good in a thread that's supposed to be helping someone, and it's my fault; I accept total blame.
Sometimes it gets frustrating when people don't make an effort to find the answer themselves. I run into this problem all the time in my personal and professional life. I don't think it's too much to ask people to seek out answers themselves first. Unfortunately, there's no way to know whether the OP looked first or not. I made an assumption and we all know what happens when you assume. I'll strive to do better. I get a lot of enjoyment out of helping people and will continue to do so. I'm also grateful for the help I've received here on the forum. |