Talk:What is a string and how do I use it?

From OHRRPGCE-Wiki
Jump to navigation Jump to search

If people approve of my answer to 'what is a script argument', I will try to write up a similarly formatted page for this question. Of course, and suggestions on improvement are welcome (I guess this ought to go in the other talk page.--Msw188 03:59, 25 September 2009 (UTC)

Go for it. --Bob the Hamster 01:14, 27 September 2009 (UTC)

In response to TMC's concerns about such an article and the differences between 'strings' and 'plotstrings' and 'text slices' and 'Wonder Bread' and everything else: I'm just gonna approach the article from a non-programmer standpoint as best I can. It seems to me to be the best way to respond to someone asking what a string is. A programmer-based answer would better be put on a page about the source and/or development plans, or maybe in answer to an FAQ more like "How are strings implemented in Hamsterspeak, and whose idea was it to do it like this anyhow?"

I hope to have a roughdraft of this article by tonight or tomorrow, but I'm not on a deadline or anything, haha--Msw188 18:40, 5 October 2009 (UTC)

Forgot to ask - is there still only 32 string IDs available in plotscripting? Is that limit meaningful at all, or will it probably disappear soon?--Msw188 18:41, 5 October 2009 (UTC)

Okay, I tried beginning this thing, but gave up and decided that I'd better ask about something here first. I think I'm stuck on what TMC was trying to warn me about - what are the words we want to use for various things? In particular, as I was typing, I was trying to distinguish between a few things:

  • The ID number and/or slot that contains some text (I was calling this 'the string', and comparing it to a variable name)
  • The symbols stored at the ID number (I was calling this 'text', and comparing it to the number stored in a variable)

What should I be referring to these two concepts as? Actually, the correct question would be 'we', because I believe the word "string" is used for both in various places throughout the wiki.

I also noticed that the string $-operators are not documented on the plotdict, or at least are not easily findable.--Msw188 13:39, 6 October 2009 (UTC)

I would call the ID number "string ID" or "string slot number". I would avoid comparing it to a variable name. As for the symbols stored at the ID number, I would call this the "text" or the "string data". I would also avoid comparing this to a variable (although, yes, it is like a variable). The limit of 32 string ID's is not likely to be increased right now. For string display, you can already use a practically unlimited number of string slices, and for string storage, there will eventually be real string variables. The current string ID slots will remain in existence, but only for back-compat. As for the $ operators, I think TMC wants to remove them entirely (although they might stay around for backcompat too) --Bob the Hamster 15:55, 6 October 2009 (UTC)

Wait, if the data is called text, but the ID is called string ID, what does the actual word "string" signify? As I read your response Mr. the Hamster, I can't help but begin to feel that perhaps I am not the best person to be writing this article, and perhaps the article should just wait until slices and string-variables are officially implemented. It sounds like you basically want to rework the basic concept of how to use strings and even what we will mean when we use the word.--Msw188 05:27, 7 October 2009 (UTC)

I think the simple term "string" would refer to a string variable of the variety that does not yet exist in the OHRRPGCE. Working with text in string ID slots allows for many string-like things to be done, and there are real FreeBasic strings behind the scenes, but no such thing as a real full-fledged OHRRPGCE string yet exists. --Bob the Hamster 18:34, 10 October 2009 (UTC)