It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I would like to know if in any language is something like this:
There are often strings that gives to an application at runtime some information that is not of informative but more functional so every character really matters. But if you mistype a single character there is a problem that can be found only in runtime.
So what I would like is a language that would find such a problem in compile time, is there anything that could do the trick in any language?
Thank you.
Congratulations, you just invented a struct. You shouldn't keep stuff like this in a string, that's what structured data is for.
You mean a mis-typed configuration value? Something like
colour = 'blue';
v.s.
color = 'blue';
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I am working on finding the similarity/differences in the source code of different java programs.
I've used an implementation of the Levenshtein algorithm to find how similar two programs are.
I want to know if there is any algorithm that can help in finding the exact positions where two strings differ.
You will find more than you ever wanted to know by looking at the inner workings of diff - see for example this link or simply the wiki article
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am trying to bind (in XAML) to a List in C++/CX and I can't seem to have any Lists. Where'd they all go? Any kind of list will do... Even a Dictionary, or Stack, or ... something! Or has C++ changed that much since I last used it?
There are C++/CX implementations of the Windows collection interfaces in the Platform::Collections namespace, defined in <collection.h>.
See also the article on Collections in C++/CX on MSDN.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I don't know if this is a proper question, but if I want to write a Sokoban game in Haskell (or other functional programming languages), what's the differences with writing it in C? [Edit: does Haskell have any advantages over C in Sokoban ?]
I would like to ask this question because of two reasons. First, my only interest in programming is to write Sokoban programs (I have already written several sokoban programs). Second, I've read some introduction/tutorial articles about Haskell, but have no idea how these new methods can be applied to the Sokoban logic.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I came across one question like this
a="hello", b="bye", c=a*b
then what will the anwser of print c?
That depends on the implementation of the * operator on string data types. And that usually depends on the programming language you use. In most statically typed languages I know, this operator is not defined on strings.
In JavaScript, the value of c will be NaN.
It's a trick question, I think. You can't multiply a string with another string. I don't think any language allows this.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
I am picking up Groovy. The language is fine. But I have a non-technical problem. One of the classes is called GString. In some context, it can be misleading. And mentioning it is not very appropriate in the office, especially when some non-technical female colleagues are around.
I guess this is not enough to justify renaming the class in the language. So how should I avoid saying "GString" when I want to say GString?
Personally, I think you should just say "GString" and use the confusion and subsequent explanation to begin conversations with the non-technical female colleagues.
Other languages call these kind of strings with placeholders "interpolated strings", so you can use that, or potentially just call them "Groovy String".
what does the G stand for? If it's Groovy, then call it GroovyString, or even GrooveString ... or guhString ... as in the lower-case sound of 'G'
I would pronounce it "GiString".
Say Gstring a lot. You female colleages may start to notice you.