reading through the docs and forums i found that the max string length
is 2048 and needs to be enclosed inside [text] [/text] tags.
I'm thinking that i misunderstood something, because reading about
processing web pages I'm sure there are times that strings are longer
than 2048.
So what did i miss or misunderstand ?p.
a qustion about string length
Hi,
the [text] [/text] quote you only need when you are creating texts
(>2048 chars) that should be i.e. printed to IO..
newlisp itself automaticly handles string size. If you processing a webpage
you dont have to bother about the size.
if you use i.e. get-url and would output it to the screen you
will see that newlisp automaticly marks it as [text]..[/text]..as
a referance that its 2048 long(er)...
Regards, Norman.
the [text] [/text] quote you only need when you are creating texts
(>2048 chars) that should be i.e. printed to IO..
newlisp itself automaticly handles string size. If you processing a webpage
you dont have to bother about the size.
if you use i.e. get-url and would output it to the screen you
will see that newlisp automaticly marks it as [text]..[/text]..as
a referance that its 2048 long(er)...
Regards, Norman.
-- (define? (Cornflakes))
Re: a qustion about string length
As with any new language, it takes a little time to figure out how to effectively search the docs.mostlywrong wrote:reading through the docs and forums i found that the max string length
is 2048 and needs to be enclosed inside [text] [/text] tags.
I'm thinking that i misunderstood something, because reading about
processing web pages I'm sure there are times that strings are longer
than 2048.
So what did i miss or misunderstand ?p.
From the manual:
You'll also get used to the parentheses. I often use a lot of extra lines to keep track of them:Strings may contain null characters and can have different delimiters. They evaluate to themselves.
"hello" →"hello"
"\032\032\065\032" →" A "
"\x20\x20\x41\x20" →" A "
"\t\r\n" →"\t\r\n"
"\x09\x0d\x0a" →"\t\r\n"
;; null characters are legal in strings:
"\000\001\002" → "\000\001\002"
{this "is" a string} → "this "is" a string"
;; use [text] tags for text longer than 2048 bytes:
[text]this is a string, too[/text]
→ "this is a string, too"
Code: Select all
(setq result (div
(mul 100
(add
(div range 2)
val
)
)
range
)
)
Code: Select all
(setq result (div (mul 100 (add (div range 2) val)) range))
...it is better to first strive for clarity and correctness and to make programs efficient only if really needed.
"Getting Started with Erlang" version 5.6.2
"Getting Started with Erlang" version 5.6.2
-
- Posts: 32
- Joined: Fri Jan 09, 2009 10:54 pm