wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Developer's Corner > Warcraft Editing Tools
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 04-10-2009, 08:31 PM   #1516
TriggerHappy
 
Join Date: Feb 2008
Posts: 405

Submissions (2)

TriggerHappy will become famous soon enough (43)TriggerHappy will become famous soon enough (43)

Default

That feature would be cool, I vote yes.
TriggerHappy is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 04-10-2009, 10:49 PM   #1517
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

Quote:
Originally Posted by TriggerHappy187
Reminds me of C#.

call BJDebugMsg(u.toInt().toString())
That's actually Java and since C# is basically "Java done wrong', it is no surprise it reminds you of C#.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 04-11-2009, 12:02 AM   #1518
TriggerHappy
 
Join Date: Feb 2008
Posts: 405

Submissions (2)

TriggerHappy will become famous soon enough (43)TriggerHappy will become famous soon enough (43)

Default

Quote:
Originally Posted by Vexorian
That's actually Java and since C# is basically "Java done wrong', it is no surprise it reminds you of C#.

So what do you say on the feature

EDIT: Maybe some extending of methods?

Well, I haven't seen a way to do it yet.

Collapse JASS:
    struct int
    
        method inHalf takes nothing returns string
            return SubString(this, 0, (StringLength(this)/2))
        endmethod
        
        method toString takes nothing returns string
            return I2S(this)
        endmethod
        
    endstruct
    
    function testing takes nothing returns nothing
        local int i = 345344
        call i.toString().inHalf()
    endfunction

Last edited by TriggerHappy : 04-11-2009 at 06:12 AM.
TriggerHappy is offline   Reply With Quote
Old 04-11-2009, 01:53 PM   #1519
Seshiro
User
 
Seshiro's Avatar
 
Join Date: Aug 2008
Posts: 158

Submissions (1)

Seshiro is on a distinguished road (20)

Default

Hah! I've found it.....http://www.wc3c.net/showpost.php?p=1...postcount=1214
this, just without variables!

Greez
Seshiro is offline   Reply With Quote
Old 04-11-2009, 02:38 PM   #1520
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

Quote:
Originally Posted by grim001
Bug report:

Collapse JASS:
globals
    constant integer Size = 24573
endglobals

struct SomeStruct [Size]

endstruct

Doesn't work when you have Size set to a variable, the value needs to be entered directly or it has no effect. This is pretty bad for systems.
I just tested that code and it works correctly, maybe you need a less reduced of an example.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 04-11-2009, 04:42 PM   #1521
akolyt0r
In Flames
 
akolyt0r's Avatar
 
Join Date: Jan 2006
Posts: 1,154

Submissions (3)

akolyt0r has a spectacular aura about (120)

Default

Collapse JASS:
struct evil
    method operator evilop takes nothing returns real
        return .evilop
    endmethod
endstruct
this looks evil !!!
__________________
akolyt0r is offline   Reply With Quote
Old 04-11-2009, 05:00 PM   #1522
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

So what? It is just your normal never-stopping self recursion.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 04-11-2009, 05:13 PM   #1523
akolyt0r
In Flames
 
akolyt0r's Avatar
 
Join Date: Jan 2006
Posts: 1,154

Submissions (3)

akolyt0r has a spectacular aura about (120)

Default

i think a decent compiler shouldnt not let a never-ending recursion compile obviously, such a thing doesnt make sense anyway (hitop, unless you use TSA).

couldnt you just check if there is another return in the function which doesnt return the function itself ?

But well if you like it, ....
I like it aswell, it looks like fun ;)
__________________

Last edited by akolyt0r : 04-11-2009 at 05:13 PM.
akolyt0r is offline   Reply With Quote
Old 04-11-2009, 05:59 PM   #1524
Earth-Fury
Two Blue
 
Earth-Fury's Avatar
 
Join Date: Mar 2003
Posts: 2,179

Submissions (7)

Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)

Send a message via MSN to Earth-Fury
Default

Quote:
Originally Posted by akolyt0r
i think a decent compiler shouldnt not let a never-ending recursion compile obviously, such a thing doesnt make sense anyway (hitop, unless you use TSA).

couldnt you just check if there is another return in the function which doesnt return the function itself ?

But well if you like it, ....
I like it aswell, it looks like fun ;)

JASS Helper isn't really a validating compiler. It does a best-effort to compile, then dies if it can't. Thus why PJASS is called after compilation.

Also, "shouldnt not" is just plain wrong. In more than one way.
__________________
Useful Links:
My Resources:
Good Resources:
Search
Tutorials
Ability Guide

UnitMaxState
BonusMod

AutoIndex
ARGB
TimerUtils

Earth-Fury is offline   Reply With Quote
Old 04-11-2009, 06:03 PM   #1525
akolyt0r
In Flames
 
akolyt0r's Avatar
 
Join Date: Jan 2006
Posts: 1,154

Submissions (3)

akolyt0r has a spectacular aura about (120)

Default

well ... that happens when you edit posts, and dont double check it afterwards ;(

Then let the inifinite recursion exist ...its fun
__________________
akolyt0r is offline   Reply With Quote
Old 04-11-2009, 06:12 PM   #1526
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

Quote:
Originally Posted by akolyt0r
i think a decent compiler shouldnt not let a never-ending recursion compile obviously, such a thing doesnt make sense anyway (hitop, unless you use TSA).

couldnt you just check if there is another return in the function which doesnt return the function itself ?

But well if you like it, ....
I like it aswell, it looks like fun ;)
Jass doesn't avoid it either:

Collapse JASS:
function err takes nothing returns nothing
    return err()
endfunction
I don't get why must it prevent it, should it also stop infinite loops then? The halting problem is still yet to be solved, I'll let the users to make that sort of mistake instead of implementing something like that, adding a check for this specific case is possible but then people will start asking me to add checks for other similar issues and that's something that does not interest me that much.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 04-11-2009, 08:49 PM   #1527
Ammorth
I blink, therefore I am.
 
Ammorth's Avatar
 
Join Date: Sep 2006
Posts: 1,812

Submissions (10)

Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)

Default

Quote:
Originally Posted by akolyt0r
i think a decent compiler shouldnt not let a never-ending recursion compile obviously, such a thing doesnt make sense anyway (hitop, unless you use TSA).

fixed:
I think a decent coder should never write code that enters never-ending loops. Such a thing doesn't make sense anyways.
__________________
Ammorth is offline   Reply With Quote
Old 04-11-2009, 10:23 PM   #1528
akolyt0r
In Flames
 
akolyt0r's Avatar
 
Join Date: Jan 2006
Posts: 1,154

Submissions (3)

akolyt0r has a spectacular aura about (120)

Default

...
have you thought of parsing blizzard.j and automatically inlining BJs ? (well...the one-line ones)...
I dont need it, and i am not sure if its good anyway, ...but it might save some work for people who convert old gui stuff to jass...
__________________
akolyt0r is offline   Reply With Quote
Old 04-11-2009, 10:39 PM   #1529
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

The optimizer already does it, so not really, though I guess that once it parses blizzard.j inlining bjs would be a side effect.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 04-11-2009, 11:15 PM   #1530
TriggerHappy
 
Join Date: Feb 2008
Posts: 405

Submissions (2)

TriggerHappy will become famous soon enough (43)TriggerHappy will become famous soon enough (43)

Default

Have you thought about what MindWorx suggested?
TriggerHappy is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 09:07 AM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services