Ok,

Thanks Patrick... We'll code around it... Sigh.

P

-----Original Message-----
From: Kennedy, Patrick [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 08, 2002 1:07 PM
To: Peter Hazlehurst
Cc: ROSE_FORUM
Subject: RE: Out of String Space in Rose 2002 - Error #14


Sorry this is a hard coded limit, with no setting to increase.

Error 14 on line 1173: Out of string space

This error means you are running up against a limit in Summit basic
scripting 
language also known as Rose script.

The only solution is to re-write your code. Here the details and an
example for 
a defect that was filed on this problem (note defect was closed as a
script 
limitation, Rose use's summit basic as the scripting
language, and not a Rose specific problem).

RBU DefectID: 11092 : 'out of string space error' in Rose Script State
__________ no fix and release note it. Reason Closed __ Vendor Code

A maximum limitation has been reached with this. Here is some text from
the 
summit documentation

Despite BasicScript's efforts to use memory efficiently, memory may
still fill up. In this case, the user receives the trappable error Out
of string space, or the fatal error Out of memory.

The ebInit function creates the string space memory area with a maximum
size of 64K. This maximum can be increased by your program by calling
the ebInstance_SetPublicSpace function. The following code sets the
maximum to 1 MB. ebInstance_SetPublicSpace(hInst,0x100000L);

EXAMPLE:

This script (see below) is showing the error:
"Out of string space"

workarounds in this example to avoid this error:

- Changing the loop variable to countdown (step -1) in the FIRST loop.
- Using 2 strings instead of a string and variant in XXX
- Setting string length of XXX.a
- Emptying properties before assinging them (again), e.g. localX.a = ""
localX.b = NULL

Option Explicit

Type XXX
a As String
b As Variant
End Type

Const size As Integer = 5000

Dim x(1 To size) As XXX

Sub Main
Dim i As Integer

For i = 1 To size
If i Mod 50 = 1 Then
x(i).a = space(i \ 50)
x(i).b = space(i \ 100)
Else
x(i) = x(i-1)
End If
Next i

Viewport.open
For i = 1 To size
Dim localX As XXX
Print i
localX = x(i)
Next i
End Sub

Patrick Kennedy
 Rational Support




>  -----Original Message-----
> From:         Peter Hazlehurst [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, April 08, 2002 10:01 AM
> To:   Rational Technical Support
> Cc:   ROSE_FORUM 
> Subject:      Out of String Space in Rose 2002 - Error #14
> 
> Hi,
> 
> We're doing some work loading XML doms into memory using Rational Rose

> 2002 Script. I've just started getting the error "out of string space"

> because some of the XML files are greater than 32K. Using the 
> automation object works great, but as soon as you say "dom.xml" to get

> the text out of it... it dies.
> 
> I believe that there is a 32K limit on a string in the current release

> of VBA script. Can someone confirm... ? And also, is there a "fix" 
> available to support longer strings?
> 
> Thx
> 
> P
> 
> ________________________
> Peter Hazlehurst
> Chief Technology Officer
> Mercari Technologies
> 
> http:  <www.mercaritech.com>
> w:  703.294.6727 x367
> c:   703.597.1750
> f:    703.294.6516
> efax: 801.457.9458  (PrivateLine)
> 
************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Post or Reply to: [EMAIL PROTECTED]
* Subscription Requests: [EMAIL PROTECTED]
* Archive of messages:
*    http://www.rational.com/support/usergroups/rose/rose_forum.jsp
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*    To: [EMAIL PROTECTED]
*    Subject: <BLANK>
*    Body: unsubscribe rose_forum
*************************************************************************

Reply via email to