How to make/edit new methods – vpgl.net

This page describes how to operate to make your own new user-defined tile on VPGL programming language. 

Buttons and Menu Items

VPGL Environment has facilities as below figure to;

  • make new class,
  • make new method,
  • clear/delete displayed method,
  • change size of grid
  • shift grid contents.

NOTE : Deleting user defined class is not unavailable currently.

NEW CLASS button

To make new user-defined class, press NEW CLASS BUTTON. Pressing this button opens following dialog to specify the new class metrics:

You should specify the new class name in “NEW CLASS NAME” field then press “Add Class” button will register new class to the system.

“Close” button cancels this new class operation.

NOTE: Currently, user-defined classes are always children of Dictionary class.

NEW METHOD Button

To make new user defined method, press”NEW METHOD” button. Pressing it opens following dialog to specify new method metrics.

New method will be added to current selected class. Before you press this button, you should change class choice.

You should specify these information about new method;
1. the new method name,
2. definition grid size,
3. whether fire it on all input arrived or not,
4. number of input and direction,
5. and number of output and direction.

In above figure, the new method name is FOO, initial grid size is 3×3, this method will wait staring execution until all inputs are arrived, this method has two inputs arrived from top edge as input 0 and left edge as input 1, and has one output emits to bottom edge as output 0.

All spec expect for its method name can change anytime later.

Clear This Method

Choosing this menu item make all grids of current method to be blank. You can choice this to erase and start over of “coding” .

Delete This Method

Choosing this menu item remove current displayed method from current displayed class.

NOTE: Currently renaming the method/class name in unavailable.

Expand

Choosing this menu item expands grid dimension, 3×3 to 5×5, or 5×5 to 7×7. Other condition makes it to do nothing. All grid contents and positions stay.

Shrink

Choosing this menu item cut off the grids of current method, 7×7 to 5×5, or 5×5 to 3×3. Other condition makes it to do nothing. All grid position stay. THEREFORE, CUT-OFF TILES WILL BE DISCARDED. This operation can not undo.

Shift Down, Up, Left, Right

Choosing these menu item shift all tile to move 1 block down, up, to left, and to right. This grid size stays. The contents of all remained tiles also stay. BUT, PUSHED-OUT TILES WILL BE DISCARDED. This operation can not undo.

IN: OUT: and ALL:

IN: and OUT: field can edit anytime to change the number and direction of inputs and outputs. These field has string only contains T, L, R, B that mean top, left, right, bottom for each. The order of them represents input id, “TL” of IN: means input 0 is top, input 1 is left. The order of OUT: represents output id, too.

ALL: checkbox represents the condition of starting execution. If checked, this method waits until arriving all inputs. Unchecked means start this on any input arriving even if others are not reached.