Page 2 of 2 [ 25 posts ]  Go to page Previous  1, 2

Biokinetica
Toucan
Toucan

User avatar

Joined: 8 Dec 2010
Age: 35
Gender: Male
Posts: 266
Location: Vulcan

25 Jan 2011, 7:33 pm

Do you want pseudocode or real code?



Cornflake
Administrator
Administrator

User avatar

Joined: 30 Oct 2010
Gender: Male
Posts: 65,740
Location: Over there

25 Jan 2011, 7:40 pm

I think we should get double points if it actually compiles. :lol:


_________________
Giraffe: a ruminant with a view.


Biokinetica
Toucan
Toucan

User avatar

Joined: 8 Dec 2010
Age: 35
Gender: Male
Posts: 266
Location: Vulcan

25 Jan 2011, 7:45 pm

Well, that'd be pretty easy, but "as complicated as possible" using raw boolean values is kind of a catch-22.



Cornflake
Administrator
Administrator

User avatar

Joined: 30 Oct 2010
Gender: Male
Posts: 65,740
Location: Over there

25 Jan 2011, 7:50 pm

true
(oops - a boolean joke)


_________________
Giraffe: a ruminant with a view.


Biokinetica
Toucan
Toucan

User avatar

Joined: 8 Dec 2010
Age: 35
Gender: Male
Posts: 266
Location: Vulcan

25 Jan 2011, 8:23 pm

MasterJedi wrote:
I need something coded

TRUE GRIT

Now, I now that TRUE is one of those ubiquitous programming words used a lot in SQL and BASIC.

Was kind of hoping to get a string showing something like "IF GRIT =1 THEN TRUE" or something.

I haven't written BASIC since I was 10.

If you can in fact do this, I'd prefer it to be as complex as possible given the length of text.

Another thing: null characters terminate strings, so there can't be any spaces in the statement. You can cheat and use an array, but...



Cornflake
Administrator
Administrator

User avatar

Joined: 30 Oct 2010
Gender: Male
Posts: 65,740
Location: Over there

25 Jan 2011, 8:32 pm

Biokinetica wrote:
MasterJedi wrote:
I need something coded

TRUE GRIT

Now, I now that TRUE is one of those ubiquitous programming words used a lot in SQL and BASIC.

Was kind of hoping to get a string showing something like "IF GRIT =1 THEN TRUE" or something.

I haven't written BASIC since I was 10.

If you can in fact do this, I'd prefer it to be as complex as possible given the length of text.

Another thing: null characters terminate strings, so there can't be any spaces in the statement. You can cheat and use an array, but...

<pedant>
But a space isn't a null character. Er, and null doesn't necessarily terminate a string - it depends on the language.
</pedant>


_________________
Giraffe: a ruminant with a view.


Biokinetica
Toucan
Toucan

User avatar

Joined: 8 Dec 2010
Age: 35
Gender: Male
Posts: 266
Location: Vulcan

25 Jan 2011, 9:03 pm

Cornflake wrote:
Biokinetica wrote:
MasterJedi wrote:
I need something coded

TRUE GRIT

Now, I now that TRUE is one of those ubiquitous programming words used a lot in SQL and BASIC.

Was kind of hoping to get a string showing something like "IF GRIT =1 THEN TRUE" or something.

I haven't written BASIC since I was 10.

If you can in fact do this, I'd prefer it to be as complex as possible given the length of text.

Another thing: null characters terminate strings, so there can't be any spaces in the statement. You can cheat and use an array, but...

<pedant>
But a space isn't a null character.
Well, if you're getting the input from the iostream, a null character will be appended by a space. Even though I don't think that's what the thread starter wants, it's still worth noting.
Quote:
Er, and null doesn't necessarily terminate a string - it depends on the language.

I don't see the point in doing this in anything but C/C++/C#. That said, if all we're doing with the code is writing a syllogism, there are better ways to do that. But yeah, you're right.



Avarice
Veteran
Veteran

User avatar

Joined: 5 Oct 2009
Age: 31
Gender: Male
Posts: 1,067

27 Jan 2011, 1:28 am

Code:
if (grit == 1)
  {
         printf("No it isn't! You have failed at life.");
  }

Seriously though, I'm not sure what you're asking, what's grit? Actually, even if I knew I don't know how to code in basic, only C.



MasterJedi
Veteran
Veteran

User avatar

Joined: 22 Oct 2010
Age: 51
Gender: Male
Posts: 2,160
Location: in an open field west of a white house

27 Jan 2011, 8:42 am

never mind. seriously. you're looking into this too deeply.

It's okay, I don't need it anymore.


_________________
That is my spot, in an ever changing world, it is a single point of consistency. If my life were expressed as a function on a four dimensional Cartesian coordinate system, that spot, from the moment I first sat on it, would be 0-0-0-0.