Path: csiph.com!usenet.pasdenom.info!news.albasani.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'syntax': 0.04; 'subject:Python': 0.06; 'arguments': 0.09; 'pointers': 0.09; 'prefix': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:into': 0.09; 'suggest': 0.14; 'books': 0.15; '>on': 0.16; 'message-id:@4ax.com': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:variable': 0.16; ':-)': 0.16; 'wrote:': 0.18; 'library': 0.18; 'meant': 0.20; 'feb': 0.22; '>>>': 0.22; 'pointer': 0.24; 'url:home': 0.24; 'mon,': 0.24; "i've": 0.25; 'equivalent': 0.26; 'header:X-Complaints-To:1': 0.27; 'function': 0.29; 'returned': 0.30; "i'm": 0.30; '(which': 0.31; 'getting': 0.31; 'are.': 0.31; "d'aprano": 0.31; 'pascal': 0.31; 'steven': 0.31; 'probably': 0.32; 'interface': 0.32; 'text': 0.33; 'could': 0.34; 'something': 0.35; 'but': 0.35; 'scheme': 0.36; 'charset:us-ascii': 0.36; 'thanks': 0.36; 'possible': 0.36; 'subject:?': 0.36; 'similar': 0.36; 'level': 0.37; 'received:76': 0.38; 'to:addr:python-list': 0.38; 'structure': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'subject:Can': 0.60; 'providing': 0.61; 'address': 0.63; 'talking': 0.65; 'details,': 0.68; 'actually,': 0.84; 'glance': 0.84; 'forgotten': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: Can global variable be passed into Python function? Date: Mon, 24 Feb 2014 21:12:26 -0500 Organization: IISS Elusive Unicorn References: <8454E8CB-E6E3-452F-8E54-9A77BFF34EC2@gmail.com> <87bny0w9w3.fsf@elektro.pacujo.net> <53084f42$0$29985$c3e8da3$5496439d@news.astraweb.com> <5308614c$0$29985$c3e8da3$5496439d@news.astraweb.com> <530b6bf2$0$29985$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-76-249-21-131.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 32 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1393294561 news.xs4all.nl 2903 [2001:888:2000:d::a6]:53641 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:67012 On 24 Feb 2014 15:57:38 GMT, Steven D'Aprano declaimed the following: >On Mon, 24 Feb 2014 21:07:42 +1300, Gregory Ewing wrote: > >> Steven D'Aprano wrote: >>> Yes, Pascal has pointers as a first-class data type. Syntax is similar >>> to C, ^x is a pointer to x, p^ dereferences the pointer p. >> >> Actually, the prefix ^ is only used for declaring pointer *types*. >> Standard Pascal has no way of getting a pointer to an arbitrary >> variable; the only way to get a pointer is new(p) (which is the >> equivalent of p = malloc(sizeof(*p))). > > > >Standard Pascal? Who uses standard Pascal? I'm talking about MacPascal :-) > >Actually, it's possible that I've forgotten the details, it's been over >twenty years since I last dereferences a Pascal pointer in anger, so you >might be right... a quick glance at some of my text books suggest that >you probably are. Thanks for the correction! Alcor Pascal (TRS-80, in my case) had a library function Location(), but the value it returned could not be used as a pointer dereference. It was mainly meant providing arguments to the interface to the assembly level call scheme (pass the address of a structure in a Z-80 register while calling something in the OS) -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/