Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Compile error


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-28-2008, 07:28 PM
Knows the basics
 
Join Date: Oct 2007
Posts: 90
Default Compile error

V.6.30, optimised compile, device.exe.

The error is...
error CS0178: invalid rank specifier: expected ',' or ']'

The program runs on the desktop. I removed ' _' line splitters but still have the problem.
The line is...

Code:
	cwData()= Array	((191,17+1,90),(191,207,180),(49+1,207,270), _
	(49+1,33+1,0),(175,33+1,90),(175,191,180),(65+1,191,270),(65+1,49+1,0), _
	(159,49+1,90),(159,175,180),(81+1,175,270),(81+1,65+1,0),(143,65+1,90), _
	(143,159,180),(97+1,159,270),(97+1,81+1,0),(127,81+1,90),(127,143,180), _
	(49+1,143,270),(49+1,17+1,0))
Any pointers please?
Reply With Quote
  #2 (permalink)  
Old 05-28-2008, 07:44 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,199
Default

You should declare cwData as a 2d array:
Code:
Sub Globals
    Dim cwdata(0,0)
End Sub

Sub App_Start
    cwData()= Array    ((191,17+1,90),(191,207,180),(49+1,207,270) , _ 
    (49+1,33+1,0),(175,33+1,90),(175,191,180),(65+1,191,270),(65+1,49+1,0), _
    (159,49+1,90),(159,175,180),(81+1,175,270),(81+1,65+1,0),(143,65+1,90), _
    (143,159,180),(97+1,159,270),(97+1,81+1,0),(127,81+1,90),(127,143,180), _
    (49+1,143,270),(49+1,17+1,0))
End Sub
Reply With Quote
  #3 (permalink)  
Old 05-28-2008, 08:00 PM
Knows the basics
 
Join Date: Oct 2007
Posts: 90
Default

This is my Dim line, sorry I didn't include it in the post. It does run on desktop!

Dim Type(X,Y,D) cwData(20,3)

[EDIT] If I turn off optimise it compiles, but I don't really understand the requirements for optimise.
I have formlib and sprite libs in the same folder, surely I don't have to copy the lib source to the folder do I?

Last edited by enonod : 05-28-2008 at 08:12 PM.
Reply With Quote
  #4 (permalink)  
Old 05-29-2008, 07:38 AM
Knows the basics
 
Join Date: Oct 2007
Posts: 90
Default

I have tried everything and cannot solve this.
I note that 'rank specifier refers in c# to arrays and uses [], I also note the error message uses ']'.
As I said, it runs on desktop and compiles without optimization.

I have no knowledge of c#, but does this all indicate a possible clue to a problem in the source for a Lib regarding the new Array command?
Reply With Quote
  #5 (permalink)  
Old 05-29-2008, 09:54 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,770
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

You don't need to specify the extra dimension for a Type, the Type specifier does that for you. Try "Dim Type(X,Y,D) cwData(20)"
Reply With Quote
  #6 (permalink)  
Old 05-29-2008, 12:38 PM
Knows the basics
 
Join Date: Oct 2007
Posts: 90
Default

Why is it always something not obvious but simple?
My thanks agraham.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile error Ricky D Questions & Help Needed 2 09-08-2008 01:21 PM
error compile manu Beta Versions 6 08-28-2008 10:14 PM
var_ags compile error agraham Beta Versions 1 08-28-2008 01:43 PM
Inconsistent compile error agraham Beta Versions 1 08-27-2008 06:34 PM
Error on compile with Optimising TonyGprs Questions & Help Needed 4 01-27-2008 12:15 PM


All times are GMT. The time now is 02:21 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0