Author Topic: Another complex function to compare elements on a list  (Read 2280 times)

0 Members and 1 Guest are viewing this topic.

robertocuba

  • Guest
Another complex function to compare elements on a list
« on: June 09, 2009, 06:09:40 PM »
Hello:

Iīm developing a following routine to compare elements inside the list:

Problem:
List: ("a" 0 0 0 10 5 10 5 5 10 15 10 0 "b" 5 5 5 15 15 15 15 5 "c" 2 2 4 5 6 7 7 8)

The routine must be return:

a sublist: ("a" 5 5 "b" 5 5) -: The 4 par of number of "a" are the same that the first par of number of "b"

Thanks !

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Another complex function to compare elements on a list
« Reply #1 on: June 09, 2009, 06:12:32 PM »
<giant face palm>
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com • http://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Another complex function to compare elements on a list
« Reply #2 on: June 09, 2009, 06:16:54 PM »
May I ask where these functions are to be used? They seem very extravagant... very assignment style...

uncoolperson

  • Guest
Re: Another complex function to compare elements on a list
« Reply #3 on: June 09, 2009, 06:20:24 PM »
yeah... kinda very much assignment like.
one leads to the other etc...

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Another complex function to compare elements on a list
« Reply #4 on: June 09, 2009, 06:32:14 PM »
I'm still trying to figure out how to evaluate the emoticon  :lmao:

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Another complex function to compare elements on a list
« Reply #5 on: June 09, 2009, 08:26:38 PM »
Robert Robert Robert   
I've reached the age where the happy hour is a nap. (°ŋ°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

JohnK

  • Administrator
  • Seagull
  • Posts: 10646
Re: Another complex function to compare elements on a list
« Reply #6 on: June 09, 2009, 09:24:55 PM »
I dont think i understand the question.

I think i see a pattern in a return of:
("a" 5 "b" 5 "c" 5)

but not necessarily just:
("a" 5 5 "b" 5 5)
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

VovKa

  • Water Moccasin
  • Posts: 1631
  • Ukraine
Re: Another complex function to compare elements on a list
« Reply #7 on: June 10, 2009, 02:32:10 AM »
hey, all of ya, no chatting no more
do you want robertocuba to be expelled from the college or something?
so, back to work everybody :)

JohnK

  • Administrator
  • Seagull
  • Posts: 10646
Re: Another complex function to compare elements on a list
« Reply #8 on: June 10, 2009, 09:16:42 PM »
oh! 'par' = 'pair'!

well, that is 'complex'! I will have to think about this one.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

uncoolperson

  • Guest
Re: Another complex function to compare elements on a list
« Reply #9 on: June 11, 2009, 10:26:38 AM »
so, robertocuba

what grade did you get?

Joe Burke

  • Guest
Re: Another complex function to compare elements on a list
« Reply #10 on: June 12, 2009, 10:21:48 AM »
This topic makes no sense to me.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Another complex function to compare elements on a list
« Reply #11 on: June 12, 2009, 11:05:05 AM »
This topic makes no sense to me.

You need to be in a middle school mood to get it.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com • http://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst