Post Reply 
Bug? Tricky syntax? Finding items in a list
11-03-2017, 03:53 PM
Post: #2
RE: Bug? Tricky syntax? Finding items in a list
Code:

EXPORT ListFIND(LST,ITEM)
BEGIN
  LOCAL II;
  LOCAL LSTPOSNS:={};
  PRINT();
  PRINT("List: "+STRING(LST));
  PRINT("FIND: "+STRING(ITEM)+"\n");


  FOR II FROM 1 TO SIZE(LST) DO
    IF TYPE(LST(II))=TYPE(ITEM) AND EQ(LST(II),ITEM) THEN
      LSTPOSNS(0):=II;
      PRINT("Pos: "+II)
    END
  END;

  RETURN LSTPOSNS;

END;

Viga C | TD | FB
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Bug? Tricky syntax? Finding items in a list - Carlos295pz - 11-03-2017 03:53 PM



User(s) browsing this thread: 1 Guest(s)