Retrogamecoding(.org) > EGSL

EGSL IDE (Haiku) Templates

(1/3) > >>

lelldorin:
Hello all,

i need some templates for my EGSL IDE. Somthing like this:


--- Code: ---Open Window:

openwindow (x,y,b,"Window Name")
closewindow()

--- End code ---



--- Code: ---Write to file:

a = open("/Path/to/file/filename", "w")
fprint(a, "Writing text to filename")
close(a)

--- End code ---


--- Code: ---If exists - write to file:

if (fileexists("/Path/to/file/filename") == false) then
a = open("/Path/to/file/filename", "w")
fprint(a, "Writing to filename")
close(a)
end

--- End code ---


--- Code: ---If Exists:

if (fileexists("test.txt") == false) then
??? How can i make Terminal output ???
end
--- End code ---

I need some thing like:

- read file
- read directory
- etc.

All in the same short way like my examples.

Also need my codes a check if they are correct?

Greetings Lelldorin

http://haikuware.com/directory/view-details/development/ides/egsl-ide

lelldorin:
Will be funny to get some templates. if you have fun to make some for me, i will be afraid.

GEEK:
have a look at the egsl documentation on the website + there are even downloads with example files ;)

lelldorin:
I want templates not examples

templates are code parts who are every time used again

Tomaaz:

--- Quote from: lelldorin on March 01, 2014, 09:09:54 pm ---templates are code parts who are every time used again

--- End quote ---

These are subroutines, functions or methods. ;)

Templates are good for markup languages (like HTML), where content is clearly separated from structure and presentation (you provide the content, while templates take care of structure and presentation), but I don't see a point in templates for programming languages. All you posted in your first post are examples, because only examples are useful in case of programming languages (in fact, you can use them as a mini-templates). Templates could look like


--- Code: ---for [your variable] = [from], [to] do
    [your code]
end

--- End code ---

but what would be the point of it? How would it be helpful in writing programs? If you know the syntax of a language, you'll write something like that from scratch quicker than it would take you to use a template. If you don't know the syntax, well... you should learn it. This is not HTML, when you can download a nice template, change the content (text, pictures etc.) and have a good looking website.

Navigation

[0] Message Index

[#] Next page

Go to full version