realbasic-nug
[Top] [All Lists]

Re: Array() Bug

To: <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Array() Bug
From: Lars Jensen <larsjensen at rcn dot com>
Date: Sat, 30 Oct 2004 12:00:49 -0400
Delivered-to: realbasic-nug at lists dot realsoftware dot com
> Numeric literals are either integers or doubles. Therefore, an array
> composed of a series of non-integer literals is an array of doubles.

There is a problem beyond that:

  dim s, a() as single
  a = Array(s)

yields "Type mismatch error.  Expected Single(), but got Double() in
MainWindow.Open, line 4: a = Array(s)"

However,

  dim s, a() as single
  a.Append s

works fine. The doc doesn't preclude Single from "Any valid datatype for an
array", so it seems appropriate to categorize this as a bug.

lj

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>