Bug 1451 : Can't make functions with return types other than void without setup
Last modified: 2010-02-02 12:41




Status:
RESOLVED
Resolution:
DUPLICATE of bug 1442
Priority:
P2
Severity:
normal

 

Reporter:
bmud
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2010-02-02 09:10
I found this bizarre because very often, while learning programming,
students want to avoid making something that loops so we would leave out
setup and draw. Or, sometimes I myself start a project by writing out a
function and testing it and store it in a building blocks folder

the following code alone without anything else in processing:

boolean test(){
return true;
}

throws an error, and I feel like that's a bug.
Additional Comment #1 From bmud 2010-02-02 09:12
processing.app.debug.RunnerException: unexpected token: boolean
at processing.app.Sketch.preprocess(Sketch.java:1362)
at processing.app.Sketch.build(Sketch.java:1471)
at processing.app.Sketch.compile(Sketch.java:1172)
at processing.app.Editor.handleRun(Editor.java:1564)
at processing.app.EditorToolbar.mousePressed(EditorToolbar.java:318)
at java.awt.Component.processMouseEvent(Component.java:5599)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3129)
at java.awt.Component.processEvent(Component.java:5367)
at java.awt.Container.processEvent(Container.java:2010)
at java.awt.Component.dispatchEventImpl(Component.java:4068)
at java.awt.Container.dispatchEventImpl(Container.java:2068)
at java.awt.Component.dispatchEvent(Component.java:3903)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3933)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)
at java.awt.Container.dispatchEventImpl(Container.java:2054)
at java.awt.Window.dispatchEventImpl(Window.java:1801)
at java.awt.Component.dispatchEvent(Component.java:3903)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
processing.app.debug.RunnerException: unexpected token: boolean
at processing.app.Sketch.preprocess(Sketch.java:1362)
at processing.app.Sketch.build(Sketch.java:1471)
at processing.app.Sketch.compile(Sketch.java:1172)
at processing.app.Editor.handleRun(Editor.java:1564)
at processing.app.EditorToolbar.mousePressed(EditorToolbar.java:318)
at java.awt.Component.processMouseEvent(Component.java:5599)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3129)
at java.awt.Component.processEvent(Component.java:5367)
at java.awt.Container.processEvent(Container.java:2010)
at java.awt.Component.dispatchEventImpl(Component.java:4068)
at java.awt.Container.dispatchEventImpl(Container.java:2068)
at java.awt.Component.dispatchEvent(Component.java:3903)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3933)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)
at java.awt.Container.dispatchEventImpl(Container.java:2054)
at java.awt.Window.dispatchEventImpl(Window.java:1801)
at java.awt.Component.dispatchEvent(Component.java:3903)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Additional Comment #2 From fry 2010-02-02 12:41


*** This bug has been marked as a duplicate of 1442 ***