TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: TIM HUTZLER
from: ANTON MONROE
date: 1996-06-28 03:07:00
subject: Using fixed strings in s

TH> foo$ = rec.CName(x??)
TH> I get compile error 421 (String operand expected)
In user-defined types, the parenthesis comes after the name of the whole
variable, and before the name of the element-- rec(x??).CName.  It makes
sense, I guess, sort of.
This is another example of how error messages aren't always too
informative.  It helps to think like a compiler.  When it looks at what
you had, its thinking is something like this:
"Okay, I understand the 'foo$ =' part.  'rec.CName' is the name of a
variable, but I haven't seen it before.  The default variable type is
integer, so I'll automatically declare it as an integer.  Oops, the user
is trying to make the string 'foo$' equal to an integer.  I'll give him
an error 421 to tell him I expect a string there."
 * RM 1.31 1209 *
--- FidoPCB v1.4 [ff013/c]
---------------
* Origin: Sound Advice - 24 Nodes (816)436-4516 (1:280/333)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.