Author |
Message |
TheCatsMeow
|
Posted: Mon Jan 24, 2011 2:13 pm Post subject: What is this and what is its purpose? |
|
|
So in my comp. sci. class, we were given an exam review booklet. One of the questions asks us to identify something and explain the purpose of it.
Example: %, <, +, :=
My question is.. What is :# and what is it used for? Does it even exist? |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Tony

|
Posted: Mon Jan 24, 2011 2:27 pm Post subject: RE:What is this and what is its purpose? |
|
|
Those are all operators. Yes, := exists. It's probably used in just about every piece of an example code. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
ProgrammingFun

|
Posted: Mon Jan 24, 2011 2:43 pm Post subject: RE:What is this and what is its purpose? |
|
|
Is it just me or does the one he/she is asking for look like :#  |
|
|
|
|
 |
2goto1

|
Posted: Mon Jan 24, 2011 3:04 pm Post subject: RE:What is this and what is its purpose? |
|
|
Interesting, what was the programming language of the test? I haven't seen :# before. |
|
|
|
|
 |
Insectoid

|
Posted: Mon Jan 24, 2011 3:05 pm Post subject: RE:What is this and what is its purpose? |
|
|
I vaguely remember being able to add that to the end of a put to format it differently, but that's very vague and might be completely different. |
|
|
|
|
 |
Tony

|
Posted: Mon Jan 24, 2011 3:14 pm Post subject: RE:What is this and what is its purpose? |
|
|
if :# means :<number> such as :4 then yes, it could be used to format strings for put statements. Something like
code: |
put "foo":10, "bar"
|
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
2goto1

|
Posted: Mon Jan 24, 2011 3:29 pm Post subject: RE:What is this and what is its purpose? |
|
|
Ah, could be. I guess without seeing the original question it's hard to say, good catch |
|
|
|
|
 |
|