Article View: news.software.readers
Article #256573Re: 40tude Dialog: Which programming language used for scripts?
From: Mike Easter
Date: Thu, 26 Dec 2013 22:34
Date: Thu, 26 Dec 2013 22:34
29 lines
2124 bytes
2124 bytes
VanguardLH wrote: > Over the years, I've use pre-written scripts to alter or add behaviors > or functionality to 40tude Dialog. Alas, some of them sometimes > generate "index out of bounds" errors. I think it has to do when > walking through the characters in strings, like the author started > walking from an incorrect indexed character in the string. > > In what programming language are scripts written? I thought it was > Delphi (aka Object Pascal). If so, doesn't the zeroth element (index 0) > of a string hold the length of the string and is not part of the string > itself? > > In C and for a string on N characters in length, you would walk through > indexes 0 to N-1 to look at each character in the string. For Pascal, > don't you use 1 to N? This article agrees with that/you: http://www.roblocher.com/whitepapers/opascal.aspx Major Differences Between the Syntax of C++ and Object Pascal Miscellaneous Feature -- C++ -- Object Pascal string constants -- "a string constant" (Note: zero based) -- 'a string constant' (Note: one based) -- Mike Easter
Technical Details
Message-ID:
<bi3p7hF9i74U1@mid.individual.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin2!goblin.stu.neva.ru!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mailReferences:
<l9fkhh$kvt$1@dont-email.me>Show Full Headers
Complete Article Headers
Message-ID: <bi3p7hF9i74U1@mid.individual.net> Subject: Re: 40tude Dialog: Which programming language used for scripts? Date: Thu, 26 Dec 2013 14:34:26 -0800 From: Mike Easter <MikeE@ster.invalid> References: <l9fkhh$kvt$1@dont-email.me> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin2!goblin.stu.neva.ru!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Newsgroups: news.software.readers Lines: 29 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net axmAf1cx7FTopNuQGfL5CQImNdbUY5popiNZACFg84IBAC5L+u Cancel-Lock: sha1:AKV9pM2DD3c/dpbpwTuWx2sS3ns= User-Agent: Mozilla/5.0 (X11; Linux i686; In-Reply-To: <l9fkhh$kvt$1@dont-email.me>