Article View: news.software.readers
Article #261422Re: Request help with 40tude dialog program syntax
From: Stijn De Jong
Date: Sun, 01 Jan 2017 11:13
Date: Sun, 01 Jan 2017 11:13
76 lines
3866 bytes
3866 bytes
Op Sun, 01 Jan 2017 08:11:09 +0000 (GMT), Rodney Pont schreef: >>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. HAPPY NEW YEAR! My mistake. I thought you were writing pseudocode. I just tried your method, and, I was shocked. It was the first time I did NOT get an error! http://i.imgsafe.org/8e26e05534.jpg (Sorry for doubting you.) :) So this "variable" thing is where I'll head next to try to resolve the problem. Unfortunately, it still failed when I tried to define the string. :( http://i.imgsafe.org/8e27315499.jpg program OnBeforeSendingMessage; var Remove_Headers : String; Remove_Headers='User-Agent: ,Date: '; Remove_Headers='User-Agent: '; Remove_Headers='Date: '; Note that I'm just testing by redefining the string three times. If it's a variable, that should not cause any error. Later on, once I can redefine the string, I will put it in an ifthenelse statement, but if I can't redefine it, the ifthenelse won't work either. >>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: '. This is what I want since I'm only trying to simplify the test case. If it's a variable, it should be able to take on any value, right? > 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. Since I was taking this step by step, where I first try to change the value and then once I can change the value, I can put it in an ifthenelse construct, I have to ask this question. Why can't I just set its value, for test purposes, to anything I want, and then change its value? var Remove_Headers : String; Remove_Headers='foo'; Remove_Headers='bar'; That seems to be the critical syntactical problem that I think I need to resolve, otherwise the iftehnelse will have the same problem anyway. HAPPY NEW YEAR!
Technical Details
Message-ID:
<o4ao8r$7gd$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-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> <nfcnzpzcvasbuvgzrhx.oj3ral0.pminews@ouse.infohit.me.uk>Show Full Headers
Complete Article Headers
Message-ID: <o4ao8r$7gd$1@news.mixmin.net> Subject: Re: Request help with 40tude dialog program syntax Date: Sun, 1 Jan 2017 12:13:16 +0100 From: Stijn De Jong <stijndekoning@nlnet.nl> 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> <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-mail Newsgroups: alt.windows7.general,news.software.readers Organization: Mixmin Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Injection-Date: Sun, 1 Jan 2017 11:13:32 -0000 (UTC) Injection-Info: news.mixmin.net; posting-host="4ef359a5b25bbe731f4ac16aa6a5bec7aef07841"; logging-data="7693"; mail-complaints-to="abuse@mixmin.net" User-Agent: 40tude_Dialog/2.0.15.41 X-Received-Body-CRC: 2232112909 X-Received-Bytes: 3787