Standard Updates

new topic     » topic index » view thread      » older message » newer message

This is a long mail on the current state of the standards.
I think most people have forgotten about this.
Unfortunately Uni get's in the way of my life.

============================================================
Math - Function Standard Structure
============================================================
" If a function can be applied to a single atom then it should accept and return
objects and
should function as an application of that operation to each element in the
object. If a function
must be applied to and only to a set number of atoms it should accept a set
number of atoms and
return the result as applicable. If a function must be applied to more than one,
but up to any
number of  atoms it should accept a sequence and return the result as
applicable.No function
should do any implicit matrix, or complex number manipulation. Thus if a
function accepts a
sequence that sequence should only contain atoms."

It's a bit wordy so here's the summary: If a function is applied to :
* an atom it takes and returns objects.
* a set number of atoms it takes that number of atoms and returns whatever
* more than one atom it takes a sequence and returns whatever. Seq can't contain
anything but
atoms. * No implicit matrix or complex math.

============================================================
Find
============================================================
From:   Joe Otto <jotto at NETZERO.NET>
Syntax: integer = find_sorted( object, sequence )
Votes:  1
Note:   Assumes the sequence is sorted

============================================================
Documentation
============================================================

Prototypes
------------------------------------------------------------
Procedure
procedure <name>( [<type> <name>] [, <type> <name>] ... )

Function
<return type> <name>( [<type> <name>] [, <type> <name>] ... )

Type
type <name>( <type> <name> )

Types are atom, integer, object, sequence
 string         - ie a sequence of characters

Routines
------------------------------------------------------------
[Platform:      DOS32/Win32/Linux]
Syntax:         [include <filename>]
  Routine Prototype/ Constant Name / Type Prototype
Description:    What it is / does
[Comments:      Things you want to know]
[Example:]
[See Also:]

Vote Submision
------------------------------------------------------------
In the Subject of the message ...
 VOTE Submission <category>
In the body of the message ...
 Name :         Name of routine/constant/etc
 [Reason :      Out of interest]

Suggestion Submision
------------------------------------------------------------
In the Subject of the message ...
 EUSTD Submission <category>
In the body of the message ...
 Name :         Name of routine/constant/etc
 Type :         New/Change to a standard
 Reason :       I want a good reason.
 [Comments :    If you want to say anything important]
 Syntax :       Function Prototype / Constant Name / Type Prototype
 Documentation :        On the lines underneath

Categories
------------------------------------------------------------
Mathematics
Sequence Manipulation
Object Oriented Programming
Algorithms
Input/Output
Networking
User Interface
Database
Graphics 2D/3D
Threads
Machine Level
Operating System
Miscellaneous
Documentation
Standards

============================================================
Math
============================================================
PI
------------------------------------------------------------
From:   RDS <rds at attcanada.com>
Syntax: PI = 3.141592653589793238
Approved!

Absolute Value
------------------------------------------------------------
From:   Colin Taylor <cetaylor at COMPUSERVE.COM>
Syntax: object abs( object )
Votes:  6
Code:
 global function abs(atom x)
  if x < 0 then return -x else return x end if
 end function

or      function abs(object obj)
     object val
     if atom(obj) then
         if obj < 0 then
             obj = -obj
         end if
     else
         for i = 1 to length(obj) do
             val = obj[i]
             if sequence(val) then
                 obj[i] = abs(val)
             else
                 if val < 0 then
                     obj[i] = -val
                 end if
             end if
         end for
     end if
     return obj
 end function

ArcCosine
------------------------------------------------------------
From:   RDS <rds at attcanada.com>
Syntax: object = arccos( object )
Approved!

ArcSin
------------------------------------------------------------
From:   RDS <rds at attcanada.com>
Syntax: object = arcsin( object )
Approved!

Maximum
------------------------------------------------------------
From:   Colin Taylor <cetaylor at COMPUSERVE.COM>
Syntax: atom max( sequence s )
Votes:  4

Mean/Average
------------------------------------------------------------
From:   Lucius Hilley <lhilley at CDC.NET>
Syntax: atom mean( sequence )
Votes:  2

Median
------------------------------------------------------------
From:   Lucius Hilley <lhilley at CDC.NET>
Syntax: atom median( sequence )
Votes:  2

Minimum
------------------------------------------------------------
From:   Colin Taylor <cetaylor at COMPUSERVE.COM>
Syntax: atom min( sequence )
Votes:  4

Mode
------------------------------------------------------------
From:   Lucius Hilley <lhilley at CDC.NET>
Syntax: atom mode( sequence )
Votes:  2

Sign
------------------------------------------------------------
From:   Colin Taylor <cetaylor at COMPUSERVE.COM>
Syntax: object sign( object )
Votes:  3
Code:
 function sgn(object r)
  return (r > 0) - (r < 0)
 end function

Sum
------------------------------------------------------------
From:   Michael Nelson <MichaelANelson at WORLDNET.ATT.NET>
Syntax: atom sum( sequence )
Votes:  2

-------------------------
Sincerely,
Mathew Hounsell

mat.hounsell at excite.com

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu