JavaScript is required to use Bungie.net

Forums

Edited by DevilzmyShadow: 10/23/2014 4:57:06 PM
10
int mad=1; if(mad=1){ System.out.print("You just jelly."); System.out.println("Hahahahaha"); } else return true;
English

Posting in language:

 

Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • Edited by Undefined: 10/23/2014 5:07:52 PM
    [quote]if(mad=1){[/quote] Well...that whole thing seems redundant. I guess everyone is always mad regardless of what mad is equal to...

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • if(mad==1){ ?

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • [quote]if(mad==1){ ?[/quote]I believe you wanted to just define an integer, "mad" without giving it an initial value. Or maybe a Boolean....

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • Freshman CS students, always easy to spot on the internet. 'mad' should be boolean, because he's either mad or he isn't. Were you to use an integer to scale the level of his anger, I'd say 1 is pretty low, so I'm assuming it was either yes or no. This function would also fail, because it returns no value if he is mad. if (mad = true) returns nothing, skipping the else clause if (mad = false) returns true to whatever function this is Keep up the studies though, I'm just messing with ya.

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • Edited by DevilzmyShadow: 10/23/2014 5:11:05 PM
    CS? I'm doing Javascript. Either why I kinda am confused what were doing right now but I feel like that's just because it's stupid HS and classes are only 45 minutes long. Not enough time for someone like me. Hard doing work at home when Destiny's whispering to me. . . .Doesn't really matter though, intend on taking classes in C++(worked with it last "year" more like 7.5-8 months). Object oriented blows or it's just me.

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • Edited by Undefined: 10/23/2014 6:47:55 PM
    np mate, 1 evaluates to true where zero evaluates to false anyway, it was just funny to read it that way, but I get the joke ;) Boolean or integer, who cares. And yes, == is a wee better :) [spoiler]ps: it's just you, OOP is pretty awesome[/spoiler]

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • bro this game uses c++ or something similar. :/

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • Edited by Undefined: 10/24/2014 12:23:07 AM
    And what exactly do you mean by that? Are you trying to work for Bungie on their game development team? It probably is in C++, though I haven't found anywhere that confirms that. Also, what do you mean by "something similar"? The C family? Because all programming languages share a number of common semantic traits. Android and IOS: neither use C++. JavaScript is a scripting language (OOP) made for the web, which is often confused with Java, which is a OOP programming language and is also used in games. There are also SDK's that attempt to facilitate programming for a particular platform or product, even if the core language used wasn't straight up OOP--but injecting methods and classes that mimic an OOP language pretty much make it so. Also, of the games that are written in C++, not all of it is 100% made up of C++ alone. Most of the world wide web you browse is also in PHP, which is a OOP language too. It really depends on what you want to do, Devil, and even then there are a number of languages you can pick from to specialize in, and even those languages have evolved from their first core/vanilla version. The forums you're using to reply to me, and the Destiny companion app, are neither written in C++.

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • Edited by DevilzmyShadow: 10/24/2014 11:05:26 AM
    Oh yeah I know. Was just saying. I think it's more the time constraints that are blocking me from fully understanding javascript. meh :/ Also I meant it to be redundant. The OP is always mad :). . . .should of done a while loop. . .

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • +1

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

You are not allowed to view this content.
;
preload icon
preload icon
preload icon