#94920 - 2001-11-10 05:28 PM
Re: Welcome MartijnL
|
Jack Lothian
MM club member
   
Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
|
I think the issue of function call conventions might be a complex issue.Function (UDF) calls are a powerful addition to Kixtart that allow the development of modular,independant & reusable code but in most programming languages a more general subroutine call is also supplied. This allows more complex modular scripts to be written & it allows one to return extra values beside the function value - such as an error or a status codes. Richard H. showed in the link below that Ruud implemented UDFs in a manner that allows us to use UDFs as if they were either/or functions or subroutines. Richard's suggestion Allowing people to use this type of calling convention will greatly increase the type of things that can be done in a UDF but it will make calling conventions much harder to define and document. If we allow this type of convention I think it might violate Bryce's suggested rule of: quote: All information passed back out from a UDF should be passed via the return variable (UDF name).
Whatever route is chosen I think we need a well defined template posted so others can follow it. Maybe Martijn, you would like to post a first shot at it using everyone's suggestions. I suggest you make the template read only & the rest of us could offer changes in this discussion or in another discussion that allows us to post comments. You could then accept revisions to the template as you see fit. [ 10 November 2001: Message edited by: JackLothian ]
_________________________
Jack
|
Top
|
|
|
|
#94921 - 2001-11-14 04:29 PM
Re: Welcome MartijnL
|
Anonymous
Anonymous
Unregistered
|
What are the opinions on the suggestion of Richard Howarth? quote: When it becomes completely stable, mail Martijnl and ask him to promote it to the UDF forum. At this point he can check that the standards have been adhered to and post it to this forum.
Sounds good to me.
|
Top
|
|
|
|
#94923 - 2001-11-14 04:43 PM
Re: Welcome MartijnL
|
Anonymous
Anonymous
Unregistered
|
Jochen, I know and I'm working on it, soon I'll post them.
|
Top
|
|
|
|
#94924 - 2001-11-14 05:02 PM
Re: Welcome MartijnL
|
Anonymous
Anonymous
Unregistered
|
Can anyone post some rules for the use of variables? I'm not sure what the best option is, and what the consequenses are.If done, I'll add them to the Guidelines-post. Thanks,
|
Top
|
|
|
|
#94927 - 2001-11-14 05:19 PM
Re: Welcome MartijnL
|
Anonymous
Anonymous
Unregistered
|
Sounds good to me. Can you give an example for a Dimmed var?
|
Top
|
|
|
|
#94928 - 2001-11-14 05:40 PM
Re: Welcome MartijnL
|
Shawn
Administrator
   
Registered: 1999-08-13
Posts: 8611
|
MartinjHere's a quick example: $_globalvariable is declared global, so it is "visible" not only to the main script, but to all functions and other called scripts ... available everywhere $localvariable is "dimmed" only within the function myfunction(), therefore it's scope is local and can NOT be referenced outside that function. This rather poor example demonstrates that one can access a global variable $_globalvariable from anywhere, but a local variable ($localvariable) only from within the function (it's dimmed in the function) ... because it's local to the function, this variable can have any name you want (which is a good thing) ... code:
break on global $_globalvariable
$_globalvariable = "global"
myfunction()
?"local=" $localvariable ; this doesn't work, $localvariable doesn't exist ?"global=" $_globalvariable
exit 1
function myfunction
dim $localvariable ; <--- here's the local DIM $localvariable = "local" ?"local=" $localvariable ?"global=" $_globalvariable endfunction
-Shawn [ 14 November 2001: Message edited by: Shawn ]
|
Top
|
|
|
|
#94929 - 2001-11-14 06:33 PM
Re: Welcome MartijnL
|
Bryce
KiX Supporter
   
Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
|
weird...the BBS cut part of my post out. my idea for the global variables was $< udfname >_< variablename > ... {edit..) weird?? < test > [ 14 November 2001: Message edited by: Bryce ]
[ 14 November 2001: Message edited by: Bryce ] this is weird... the BBS is not letting me wrap a word in < > type brackets unless i put a space in there.... [ 14 November 2001: Message edited by: Bryce ]
|
Top
|
|
|
|
#94931 - 2001-11-15 08:17 PM
Re: Welcome MartijnL
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,A short reaction. After reading all the comment we had some remarks about it:
- the board should not only for UDF's but also for scripts. Sometimes
code should run also on a previously kixtart release, which can be an UDF.
- published UDF's must be related to member name. Possible reactions will
inform the member (= creator of UDF). The contents of topics and reactions should not be influence by a moderator. A writter doesn't like that other persons are rewritting his book. Very restrictive way of publishing UDF's can stop the great amount of creativity of members. Many other (mostly commercial) sites are very restrictive in the way of using. Just a piece of freedom makes this board great. Of course it will not mean that no guidelines must be created. Specially the title of a topic is very important. Everybody must be aware that the guidelines doesn't give him a nasty fright in publishing a very nice UDF (idea). We saw some very nice and also very small UDF's on the forums, which doesn't need any comment at all. A good name for an UDF is also very important. And of course this forum should only contain scripts. Members will find there own way.
- A possible suggestion about removing information from the board
isn't such a good idea. Also replacing them. Why? - sometimes links will be used to those topics. - what is the definition of obsolete? mostly we are thinking about "it is not running on all windows versions". we must realize that microsoft and other com- panies are publishing a great amount of new releases of there software which influence many scripts on this board. it will be an utopia that members will always upgrading their scripts. UDF's and scripts can be used and can give also ideas. It can inspire readers. Suggestions: - the moderator will standardize the topic-title. On the other forums a lot of titles doesn't reflect the contents of those topics. - the moderator doesn't only publish an accurate guideline document, but also a list of published topics which can be extracted from the topic-list.
- we like Bryce's suggestions about
- variable usage: This way the internal workingsof UDF can not interfere with the calling script, no matter what variable names were used.. it is very normal for programmers to do so. - store scripts in plain text. possible a location on the kixtart.org can used for that, but it would be nice that some other sites can be a backup for it. possible that all scripts can put in one ZIP file for downloading.
- the idea of Richard Howarth about promote it to the UDF forum
we doesn't like at all. With this suggestion a member doesn't have any freedom at all. By implemen- tation of this for us the http://www.scriptlogic.com/kixtart site has more freedom and capabilities. Freedom: not so restrictive. Capabilities: you can vote on script, which may incorporated in kixtart itself and as creator you can see "how usefull your script is". The latest build shows the effects of vo- ting capabilities. See also next items for "why".
- the remark of Richard Howarth about he (moderator) can check the standards
have been adhered can result in unexpected results. we think first at issues like: - presentation of commands, functions, macros and variables. f.e. commands must be lowercase, functions may not presented like 'GetFileAttr' but should be 'getfileattr', macros must be uppercase and variables must start with a letter. - the indentation usage - it isn't possible to put 'print'-statements in it. also no debugging code. - the variables aren't the wanted ones. question: what is the freedom of script creator which only want to share some code/idea with the kixtart population.
- the idea that members can't influence topics on this forum we doesn't
like. It can be very frustating that you get a script without the knowledge what reactions were and are made on it, also it can very frustating for the creator of a script which can put an one-liner (f.e. a new version will release soon or a minor.major problem will be fixed) to his script topic.
Some questions:
- what to do with good (old) scripts on the other forums?
- how handles the moderator by an OPEN forum, when a simply
kixtart question is put on it? inform sender and remove or close it?
- what happens with a CLOSE forum, when f.e. the moderator is on
vacation or doesn't have the time anymore? Possible that Martijn can use an email address like scripts@kixtart.org.
- what to do with copyrights? publishing scripts by moderator suggest
kixtart.org has the rights on it. for us all scripts are freeware and all copyrights belongs to creator of script.
- what are the benefits when we are introducing a CLOSE forum instead
of using the function library on the http://www.scriptlogic.com/kixtart site? what disadvantages you are thinking of by a very restrictive forum for putting UDFs on?
greetings.btw: Martijn and other members don't think we are against the forum, but we doesn't like extremly regulation of using it. WE MUST REMEMBER "everything on this board is VOLUNTEER WORK" Don't give members a nasty fright in publishing a very nice UDF (idea). [ 16 November 2001: Message edited by: MCA ]
|
Top
|
|
|
|
#94935 - 2001-11-19 05:25 PM
Re: Welcome MartijnL
|
Shawn
Administrator
   
Registered: 1999-08-13
Posts: 8611
|
I agree with MCA and Jack (I think) ...Lets just open-up the UDF forum and go from there ... everyone will pretty much adhere to the informal standards ... Martinj can clean-up the forum every so often and advise of anyone not following the rules ... And let's allow feedback and constructive critizisms in there as well - as thread owner, the Author can repost amendments/enhancements to first post ... Allowing feedback will also act as an interesting audit trail and show the evolution of the UDF ... As it stands, I think we're stiffling the forum with a lot of unneccessary rules and regulations ... not to mention maybe discouraging (scaring off) new folk from posting ... to bastardize a famous quote: "I'd rather see a crooked UDF, than a UDF un-posted"  -Shawn By the way - lots of source code library boards work this way ... the author posts the code ... than folks tack-on feedback and suggestions and the author responds/amends ... makes for some interesting reading ... sometimes even leads to function spin-offs and new ideas for other usefull functions ... all this from a unified single thread (idea). -Shawn
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 581 anonymous users online.
|
|
|