Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Programming
You last visited: Today at 11:24

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Question] Coding Syntax

Discussion on [Question] Coding Syntax within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old 12/13/2010, 08:35   #16
 
elite*gold: 0
Join Date: Nov 2010
Posts: 1,162
Received Thanks: 370
Quote:
Originally Posted by InfamousNoone View Post
Code:
    class Program
    {
        public static int Cookies { get; private set; }
        static void Main(string[] args)
        {
            Cookies = int.Parse(Console.ReadLine());
            Console.WriteLine(Cookies > 0 ? "You have cookies!" : "You have no coookies!");
        }
    }
The point was to make it looks crazy xD
But u just learned me a thing, I never knew was possible. Cookies > 0 ?
Syst3m_W1z4rd is offline  
Old 12/13/2010, 08:47   #17
 
elite*gold: 0
Join Date: Feb 2006
Posts: 550
Received Thanks: 82
Quote:
Originally Posted by Syst3m_W1z4rd View Post
The point was to make it looks crazy xD
But u just learned me a thing, I never knew was possible. Cookies > 0 ?
Ternary operation - Wikipedia, the free encyclopedia
ChingChong23 is offline  
Thanks
1 User
Old 12/13/2010, 19:46   #18
 
ImmuneOne's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
Quote:
Originally Posted by InfamousNoone View Post
Saint (tao4229) and I despise Java, that's why I thought it'd be funny to post that. I'm glad other than us picked up on the joke.
ImmuneOne is offline  
Thanks
3 Users
Old 12/13/2010, 23:25   #19
 
xScott's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 322
Received Thanks: 63
Quote:
Originally Posted by InfamousNoone
Console.WriteLine(Cookies > 0 ? "You have cookies!" : "You have no coookies!");
what does that do o-o
explain?

edit: nvm google is my friend.

Quote:
Originally Posted by ImmuneOne View Post
lol'd
xScott is offline  
Old 12/13/2010, 23:30   #20
 
elite*gold: 0
Join Date: Nov 2010
Posts: 1,162
Received Thanks: 370
Quote:
Originally Posted by xScott View Post
what does that do o-o
explain?



lol'd
Read the link by ChingChong.
Syst3m_W1z4rd is offline  
Old 12/14/2010, 06:28   #21
 
elite*gold: 0
Join Date: Feb 2006
Posts: 550
Received Thanks: 82
that Java the Javatar is gold, saw it awhile ago.
ChingChong23 is offline  
Old 12/14/2010, 06:42   #22
 
Ian*'s Avatar
 
elite*gold: 0
Join Date: Nov 2006
Posts: 805
Received Thanks: 464
I saw someone posted that on cxp a few months back.

If I told you what I think of java i'd just be trollin'.
Ian* is offline  
Thanks
1 User
Old 12/14/2010, 07:28   #23
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
I just linked nearly every programmer on my MSN list to that Java video.
Bricks were shat.
InfamousNoone is offline  
Thanks
2 Users
Old 12/14/2010, 14:02   #24
 
elite*gold: 20
Join Date: Aug 2005
Posts: 1,734
Received Thanks: 1,001
Yah, java is fun. Here's a code to print "Hello world!":
PHP Code:
interface Printer {
    
void print(Message message);
}

class 
Message {
    private 
String message;

    public 
Message(String message) {
        
this.message message;
    }

    public 
void print(Printer printer) {
        
printer.print(this);
    }

    public 
String toString() {
        return 
message;
    }
}

abstract class 
AbstractPrinterFactory {
    public static 
AbstractPrinterFactory getFactory() {
        return new 
SystemOutPrinterFactory();
    }

    public abstract 
Printer getPrinter();
}

class 
SystemOutPrinterFactory extends AbstractPrinterFactory {
    public 
Printer getPrinter() {
        return new 
SystemOutPrinter();
    }
}

class 
SystemOutPrinter implements Printer {
    public 
void print(Message message) {
        
System.out.println(message);
    }
}

class 
HelloWorld {
    public static 
void main(String[] args) {
        
Message message = new Message("Hello world!");
        
AbstractPrinterFactory factory SystemOutPrinterFactory.getFactory();
        
Printer printer factory.getPrinter();
        
message.print(printer);
    }

P.S Loved the video.
tanelipe is offline  
Old 12/14/2010, 21:30   #25
 
.Kinshi's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 341
Received Thanks: 255
Quote:
Originally Posted by tanelipe View Post
Yah, java is fun. Here's a code to print "Hello world!":
PHP Code:
interface Printer {
    
void print(Message message);
}

class 
Message {
    private 
String message;

    public 
Message(String message) {
        
this.message message;
    }

    public 
void print(Printer printer) {
        
printer.print(this);
    }

    public 
String toString() {
        return 
message;
    }
}

abstract class 
AbstractPrinterFactory {
    public static 
AbstractPrinterFactory getFactory() {
        return new 
SystemOutPrinterFactory();
    }

    public abstract 
Printer getPrinter();
}

class 
SystemOutPrinterFactory extends AbstractPrinterFactory {
    public 
Printer getPrinter() {
        return new 
SystemOutPrinter();
    }
}

class 
SystemOutPrinter implements Printer {
    public 
void print(Message message) {
        
System.out.println(message);
    }
}

class 
HelloWorld {
    public static 
void main(String[] args) {
        
Message message = new Message("Hello world!");
        
AbstractPrinterFactory factory SystemOutPrinterFactory.getFactory();
        
Printer printer factory.getPrinter();
        
message.print(printer);
    }

P.S Loved the video.

Now don't get me wrong, I think Java is horrible.
But you're over exaggerating :P

Code:
package helloworld;

public class Main {
    public static void main(String[] args) {
        System.out.println("Hello World");
    }
}
Now if you wanted to show something horrible in Java, show how you open and work with files! Ugh!
.Kinshi is offline  
Thanks
1 User
Old 12/15/2010, 05:32   #26
 
elite*gold: 0
Join Date: Feb 2006
Posts: 550
Received Thanks: 82
make your own framework wrapped around java's file IO system, if you want it spoonfed to you like .net does.
ChingChong23 is offline  
Old 12/15/2010, 08:07   #27
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
Thing is though, .NET allows you to chose whether to be spoon fed, or whether to PInvoke and do it all yourself. Java on the other hand ***** slaps you with JNI which is just such a pain.
InfamousNoone is offline  
Old 12/15/2010, 08:12   #28
 
mazestricks's Avatar
 
elite*gold: 0
Join Date: Oct 2010
Posts: 5
Received Thanks: 0
if(condition)
{
statement
}
mazestricks is offline  
Old 12/15/2010, 13:39   #29
 
elite*gold: 0
Join Date: Feb 2006
Posts: 550
Received Thanks: 82
Quote:
Originally Posted by InfamousNoone View Post
Thing is though, .NET allows you to chose whether to be spoon fed, or whether to PInvoke and do it all yourself. Java on the other hand ***** slaps you with JNI which is just such a pain.
if you work with dll's a lot (which i assume you do) then i can understand why you dislike java
ChingChong23 is offline  
Old 12/15/2010, 23:23   #30
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
The idea of J# (or just the general idea of coding an extension on top of the .NET framework that would allow Java code to compile to IL) and extend the language further to support some of .NET's features was brilliant. It's too bad it was discontinued.



Is also brilliant too, but looks like it's not being updated any further either.
InfamousNoone is offline  
Reply


Similar Threads Similar Threads
Coding npc(last question)
06/17/2010 - CO2 Private Server - 20 Replies
hi, i have conquer pserver, i need a video who show me all the steps of changing the price of an npc( breeder for exemple) pelase guys, i know it's a lot but i'm so needding it thanks
[Question]Syntax for Pet..
03/22/2010 - EO PServer Hosting - 5 Replies
Hey, You know when you compose on top left it says " So and so have composed so and so." well something like that, Whats the Syntax for the pet? Like the Syntax %user_name = Display of the character name. I need to where i can find it and after 50* where the orange fireworks and the GM broadcast saying "So and so's pet is this many stars congratz" http://i430.photobucket.com/albums/qq23/MikeMadMa n_album/lol-1.jpg Just all smudgy cuz i wanna keep my privacy O_O Thanks.
Question About Coding...
07/03/2008 - Conquer Online 2 - 12 Replies
Ok I Need Sum Help With A PvP Server It Has infinity Stamina taths noth the probleem but HERC is (they spam it like hell ) How Could Our Team Delet Skill "Herc" or make the command admin Thx For Help If u Wanne Join Us go TO DragonCO :P



All times are GMT +1. The time now is 11:24.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.