Article View: news.software.readers
Article #261420Re: Request help with 40tude dialog program syntax
From: Rodney Pont
Date: Sun, 01 Jan 2017 08:11
Date: Sun, 01 Jan 2017 08:11
74 lines
3474 bytes
3474 bytes
On Sun, 1 Jan 2017 00:18:50 +0100, Stijn De Jong wrote: >Op Sat, 31 Dec 2016 21:35:45 +0000 (GMT), Rodney Pont schreef: > >> var >> Remove_Headers : String; >> Try adding the var section as above. If that says it's a duplicate the >> Remove_Headers has been defined elsewhere, likely as a const, so try to >> find where and change it to a string. > >I see what you're getting at, which is to define the string as a variable >instead of as a constant. > >Given that syntax is my only problem, this definition should work as the >first 2 lines of the program after the "program" line, right? > >program OnBeforeSendingMessage; >var >Remove_Headers : 'User-Agent: ,Date: '; No, that shouldn't work, the var section should be used to define variables, not to set them to a value, it needs the word String to tell it that the variable is a string type, see above. >Unfortunately, that fails with the error below: >http://i.imgsafe.org/8398770bfe.jpg >"(Error) OnBeforeSendingMessage.ds(3.18): Identifier expected > >The actual syntax goal would be solved if I can do this: >program OnBeforeSendingMessage; >var > Remove_Headers : 'User-Agent: ,Date: '; > Remove_Headers : 'User-Agent: '; > Remove_Headers : 'Date: '; Even once you have defined the variable as a string it will only hold one assignment at a time so each time you assign a new value it overwrite the previous one and will have the value 'Date: '. I think you need to have the var section to define the string variable then you need you if elses to set it's value. >function OnBeforeSendingMessage():boolean; >begin >end; > >begin >end. > >I tried exactly that above, which is as simple as I can make the program. > >It failed with the same error: >http://i.imgsafe.org/83b4808676.jpg > >The simple script fails with a "duplicate identifier": >http://i.imgsafe.org/83c1060a72.jpg > >program OnBeforeSendingMessage; > const > Remove_Headers = 'User-Agent: ,Date: '; > Remove_Headers = 'User-Agent: '; > Remove_Headers = 'Date: '; > >function OnBeforeSendingMessage():boolean; >begin >end; > >begin >end. -- Faster, cheaper, quieter than HS2 and built in 5 years; UKUltraspeed <http://www.500kmh.com/>
Technical Details
Message-ID:
<nfcnzpzcvasbuvgzrhx.oj3ral0.pminews@ouse.infohit.me.uk>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.(126883).mbox.7z!not-for-mailReferences:
<o491jh$7jr$1@gioia.aioe.org> <o4926s$933$1@gioia.aioe.org> <nfcnzpzcvasbuvgzrhx.oj2tz62.pminews@ouse.infohit.me.uk> <o495cr$177$1@news.mixmin.net> <nfcnzpzcvasbuvgzrhx.oj2xvl5.pminews@ouse.infohit.me.uk> <o49ed3$jpp$1@news.mixmin.net>Show Full Headers
Complete Article Headers
Message-ID: <nfcnzpzcvasbuvgzrhx.oj3ral0.pminews@ouse.infohit.me.uk> Subject: Re: Request help with 40tude dialog program syntax Date: Sun, 01 Jan 2017 08:11:09 +0000 From: "Rodney Pont" <mlist4@infohit.me.uk> References: <o491jh$7jr$1@gioia.aioe.org> <o4926s$933$1@gioia.aioe.org> <nfcnzpzcvasbuvgzrhx.oj2tz62.pminews@ouse.infohit.me.uk> <o495cr$177$1@news.mixmin.net> <nfcnzpzcvasbuvgzrhx.oj2xvl5.pminews@ouse.infohit.me.uk> <o49ed3$jpp$1@news.mixmin.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.(126883).mbox.7z!not-for-mail Newsgroups: alt.windows7.general,news.software.readers Lines: 76 Reply-To: "Rodney Pont" <mlist4@infohit.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: individual.net xlPUR2IHeDaPekm0DeX9Pg+63RoQL7C5P7uL2IT2f5LUdV2vua X-Orig-Path: ouse.infohit.me.uk!not-for-mail Cancel-Lock: sha1:VJTvg8hEuBGItQTMbkkSa5TRbls= X-Newsreader: PMINews 2.00.1205 For OS/2 X-Received-Body-CRC: 4005610474 X-Received-Bytes: 3385