Ignore:
Timestamp:
04/30/14 20:25:32 (10 years ago)
Author:
Maciej Komosinski
Message:

Used | instead of + when adding binary flags

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/vm/classes/collectionobj.cpp

    r197 r240  
    1919 "Example:\nvar v=Vector.new();\nv.add(123); v.add(\"string\");",},
    2020{"clear",0,PARAM_NOSTATIC,"clear data","p()",PROCEDURE(p_clear),},
    21 {"size",0,PARAM_READONLY+PARAM_NOSTATIC,"element count","d",GETONLY(size),},
     21{"size",0,PARAM_READONLY | PARAM_NOSTATIC,"element count","d",GETONLY(size),},
    2222{"remove",0,PARAM_NOSTATIC,"remove at position","p(d position)",PROCEDURE(p_remove),},
    2323{"get",0,PARAM_NOSTATIC,"get value at position","p x(d position)",PROCEDURE(p_get),},
     
    2525{"add",0,PARAM_NOSTATIC,"append at the end","p(x value)",PROCEDURE(p_add),},
    2626{"find",0,PARAM_NOSTATIC,"find","p d(x value)",PROCEDURE(p_find),"returns the element index or -1 if not found"},
    27 {"avg",0,PARAM_READONLY+PARAM_NOSTATIC,"average","f",GETONLY(avg)},
    28 {"stdev",0,PARAM_READONLY+PARAM_NOSTATIC,"standard deviation","f",GETONLY(stdev),"=sqrt(sum((element[i]-avg)^2)/(size-1)) which is estimated population std.dev. from sample std.dev."},
    29 {"toString",0,PARAM_READONLY+PARAM_NOSTATIC,"textual form","s",GETONLY(toString),},
     27{"avg",0,PARAM_READONLY | PARAM_NOSTATIC,"average","f",GETONLY(avg)},
     28{"stdev",0,PARAM_READONLY | PARAM_NOSTATIC,"standard deviation","f",GETONLY(stdev),"=sqrt(sum((element[i]-avg)^2)/(size-1)) which is estimated population std.dev. from sample std.dev."},
     29{"toString",0,PARAM_READONLY | PARAM_NOSTATIC,"textual form","s",GETONLY(toString),},
    3030{"new",0,0,"create new Vector","p oVector()",STATICPROCEDURE(p_new),},
    3131{"sort",0,PARAM_NOSTATIC,"sort elements (in place)","p(o comparator)",PROCEDURE(p_sort),"comparator can be null, giving the \"natural\" sorting order (depending on element type), otherwise it must be a function reference obtained by the \"function FUNCTIONNAME\" operator.\n\nExample:\nfunction compareLastDigit(a,b) {return (a%10)<(b%10);}\nvar v=[16,23,35,42,54,61];\nv.sort(function compareLastDigit);"},
    32 {"iterator",0,PARAM_NOSTATIC+PARAM_READONLY,"iterator","o",GETONLY(iterator),},
     32{"iterator",0,PARAM_NOSTATIC | PARAM_READONLY,"iterator","o",GETONLY(iterator),},
    3333{0,0,0,},
    3434};
     
    4444 "var i;\nfor(i=0;i<d.size;i++) Simulator.print(d.getKey(i)+\" is \"+d.get(i));",},
    4545{"clear",0,PARAM_NOSTATIC,"clear data","p()",PROCEDURE(p_clear),},
    46 {"size",0,PARAM_NOSTATIC+PARAM_READONLY,"element count","d",GETONLY(size),},
     46{"size",0,PARAM_NOSTATIC | PARAM_READONLY,"element count","d",GETONLY(size),},
    4747{"remove",0,PARAM_NOSTATIC,"remove named or indexed element","p(x key)",PROCEDURE(p_remove),},
    4848{"get",0,PARAM_NOSTATIC,"get named or indexed element","p x(x key)",PROCEDURE(p_get),},
     
    5151{"find",0,PARAM_NOSTATIC,"find","p s(x value)",PROCEDURE(p_find),"returns the element key or null if not found"},
    5252{"new",0,0,"create new Dictionary","p oDictionary()",STATICPROCEDURE(p_new),},
    53 {"toString",0,PARAM_READONLY+PARAM_NOSTATIC,"textual form","s",GETONLY(toString),},
     53{"toString",0,PARAM_READONLY | PARAM_NOSTATIC,"textual form","s",GETONLY(toString),},
    5454{0,0,0,},
    5555};
     
    442442{
    443443 {"VectorIterator",1,2,"VectorIterator","VectorIterator"},
    444 {"next",0,PARAM_READONLY+PARAM_NOSTATIC,"next","d 0 1",GETONLY(next),},
    445 {"value",0,PARAM_READONLY+PARAM_NOSTATIC,"value","x",GETONLY(value),},
     444{"next",0,PARAM_READONLY | PARAM_NOSTATIC,"next","d 0 1",GETONLY(next),},
     445{"value",0,PARAM_READONLY | PARAM_NOSTATIC,"value","x",GETONLY(value),},
    446446{0,0,0,},
    447447};
Note: See TracChangeset for help on using the changeset viewer.