6 Replies - 1515 Views - Last Post: 07 March 2013 - 02:32 PM Rate Topic: -----

#1 zedth2  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 121
  • Joined: 14-September 09

Pascal and Pears and Oranges and Wikipedia....I think it's lie

Posted 07 March 2013 - 12:43 PM

Hi everybody,
So I was reading the wiki on Pascal and found this line...
z : Pear..Orange;
Set3 : set of Pear..Orange;



So I just had know what was in the middle of the set containing pear and orange so I installed the free pascal compiler and tried it. I wrote this...
PROGRAM Hello(output);

VAR
	Set3 : set of pear..orange;
	
BEGIN
	writeln(z);
END.


I also tried it the other where of just declaring z but that didn't work either.

It errors out saying...
pear.pas(4,20) Error: Identifier not found "Pear"
pear.pas(4,28) Error: Identifier not found "Orange"

Which is exactly what I expected to come out because the idea that a programmer suddenly decided that this set should exist in a language, thats been used for years, seemed kind of absurd. So I'm assuming Wikipedia is lying to me. So will someone tell me that I'm right or show me the working code that does this. I mean I'm sure you could use some sort of string set containing all possible combinations between Pear and Orange, still seems stupid. But I don't think it understands the ideas of fruit. So please someone just confirm that I'm not crazy. I mean frankly if Pascal actually does understand the ideas of fruit and the set containing fruit I'm gonna learn it because that's just crazy. Though if I ever build a language, and one day I will, I just might put it in. Because I'm a nerd and programming and MATHHHHH.

Thanks for helping me understand.

Is This A Good Question/Topic? 0
  • +

Replies To: Pascal and Pears and Oranges and Wikipedia....I think it's lie

#2 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7301
  • View blog
  • Posts: 12,158
  • Joined: 19-March 11

Re: Pascal and Pears and Oranges and Wikipedia....I think it's lie

Posted 07 March 2013 - 01:19 PM

Looks to me like there was probably an example in there in which some sort of enumerated type was defined, and this relied on that. You might want to review the article history.
Was This Post Helpful? 0
  • +
  • -

#3 zedth2  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 121
  • Joined: 14-September 09

Re: Pascal and Pears and Oranges and Wikipedia....I think it's lie

Posted 07 March 2013 - 02:12 PM

I see I did not know I could do that with wikipedia. An enumerated type was the only thing that even began to make sense and it was. For some reason that piece of code had been deleted. Heres the original enumeration in case anyone is curious.

e: (apple, pear, banana, orange, lemon);



Thanks for the info

This post has been edited by zedth2: 07 March 2013 - 02:12 PM

Was This Post Helpful? 0
  • +
  • -

#4 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7301
  • View blog
  • Posts: 12,158
  • Joined: 19-March 11

Re: Pascal and Pears and Oranges and Wikipedia....I think it's lie

Posted 07 March 2013 - 02:20 PM

Now for fun, you might think about doing some edits to fix what looks like a bug in the page.
See, you can do that, 'cause it's wikipedia.
Was This Post Helpful? 0
  • +
  • -

#5 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7301
  • View blog
  • Posts: 12,158
  • Joined: 19-March 11

Re: Pascal and Pears and Oranges and Wikipedia....I think it's lie

Posted 07 March 2013 - 02:20 PM

(why did that post twice????)

This post has been edited by jon.kiparsky: 07 March 2013 - 02:22 PM

Was This Post Helpful? 0
  • +
  • -

#6 zedth2  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 121
  • Joined: 14-September 09

Re: Pascal and Pears and Oranges and Wikipedia....I think it's lie

Posted 07 March 2013 - 02:28 PM

My connection to dreamincode keeps dropping for some reason so it dropped on the fist time I posted it so I tried to post it again. Sorry about that
Was This Post Helpful? 0
  • +
  • -

#7 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7301
  • View blog
  • Posts: 12,158
  • Joined: 19-March 11

Re: Pascal and Pears and Oranges and Wikipedia....I think it's lie

Posted 07 March 2013 - 02:32 PM

I meant my post, actually. The site seems to be a bit wonky today... for a change. :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1