Search found 37 matches

by RodSnow
Jan 23, 2009 6:19
Forum: Beginners
Topic: String/Integer conversions
Replies: 14
Views: 2086

In the following code is there a better way of making the assignments in "Declare Sub Set ()"? Type aMoveType Declare Sub Set (iRank As Integer, iSuit As String, iMoveFrom As Integer, iMoveTo As Integer, iAutoMove As Integer) Declare Function ToString() As String Rank As Integer Suit...
by RodSnow
Jan 23, 2009 5:23
Forum: Beginners
Topic: String/Integer conversions
Replies: 14
Views: 2086

KristopherWindsor, I have managed to get a hazy idea of how the code works. But I need clarification on one item. "The Return Rank & Suit ...". Does this return to the calling code with Rank and Suit values or is there more to it? Thank You for Your help. I think I will be able to get rid of the...
by RodSnow
Jan 22, 2009 4:10
Forum: Beginners
Topic: String/Integer conversions
Replies: 14
Views: 2086

KristopherWindsor, I copied and pasted Your code as is to play with the various parts of the program to understand what is going on, No luck. aMoveType ' Variable not declared aMoveType.set ' Member isn't static aMoveType.set () ' Member isn't static aMoveType.set (irank As Integer, isuit As String)...
by RodSnow
Jan 22, 2009 1:08
Forum: Beginners
Topic: String/Integer conversions
Replies: 14
Views: 2086

KristopherWindsor, I hope You don't mind me picking apart Your suggestion and asking a bunch of questions. As it stands I do not know how it works, so here is My first question: Declare Sub set (irank As Integer, isuit As String) The above is in a Type statement. Is there an advantage of having it t...
by RodSnow
Jan 20, 2009 22:08
Forum: Beginners
Topic: String/Integer conversions
Replies: 14
Views: 2086

String Replacement Efforts

In the below I am sure that all I would have to do to increment Count: Moves.Count = Moves.Count + 1 I do not know how to put together the string of moves for printing. After printing the status of the game I also print the MoveRecord to show all the moves that took me to that point. I also need to ...
by RodSnow
Jan 20, 2009 7:05
Forum: Beginners
Topic: String/Integer conversions
Replies: 14
Views: 2086

I have seen that and was lost just after the word syntax. I will try to put together what I understand of this and post it later for comments/corrections. Thank You
by RodSnow
Jan 20, 2009 4:08
Forum: Beginners
Topic: String/Integer conversions
Replies: 14
Views: 2086

Code from my program

OK, here it goes. As I stated above I have been unable to understand the alternate methods of recording data. The examples have been beyond me. The following is code that I have in my program and if I could see examples that would directly apply to my situation I might be able to understand it bette...
by RodSnow
Jan 20, 2009 3:23
Forum: Beginners
Topic: String/Integer conversions
Replies: 14
Views: 2086

Thanks for the help

In one of my past posts, it was mentioned that there would be a better way of handling the recording of the moves. Unfortunately the examples were way beyond my grasp. If I could find some one to grind this out with I would do much better.
by RodSnow
Jan 20, 2009 1:28
Forum: Beginners
Topic: String/Integer conversions
Replies: 14
Views: 2086

String/Integer conversions

I am trying to increase the value of an item in a string. I have tried every conbination of val and string$ to accomplish this with no success. 06Spad010910 06Diam011010 ... Is an example of "MoveRecord". val(Left$(Right$(MoveRecord, 3), 1)) = val(Left$(Right$(MoveRecord, 3), 1)) + 1 gets me an erro...
by RodSnow
Jan 14, 2009 5:23
Forum: Beginners
Topic: Select Case Statement
Replies: 1
Views: 1373

Select Case Statement

How should the following case statement be written. For i As Integer = 1 To 16 ' Init TopCard(1 To 18) For each Cell Select Case i Case i <= 4 ' TopCard is 7 if column is <= 4 TopCard(i) = 7 Case i <= 8 TopCard(i) = 6 Case i <= 16 TopCard(i) = 0 End Select next i
by RodSnow
Dec 30, 2008 0:31
Forum: Beginners
Topic: String Operations Question
Replies: 7
Views: 1337

Type, Thanks for the suggestion

In the following what are the Question marks for? I noticed them in other parts of the code also. Also, what is the difference between the constructor and the Operator? I have the Constructor integrated in the program and is compiling without errors. (I just have not figured out how to use it yet.) ...
by RodSnow
Dec 28, 2008 0:09
Forum: Beginners
Topic: String Operations Question
Replies: 7
Views: 1337

String Operations Question

What is the best way of handling the following situation: I have a MoveRecord string that consists of a record of moves that is made by the program. for example the last record on the string is 003Diam1109 and a blank space. They stand for 0 or 1 to indicate an automatic move 03 is the rank of the c...
by RodSnow
Dec 06, 2008 9:09
Forum: Beginners
Topic: First Code and a long way to go, Your Opinion??
Replies: 20
Views: 3115

Problem with Array comparisons

I have narrowed my problems with the Arrays. I am able to equate arrays as follows: CardA(TopC(MTo) + 1, MTo) = FreeCell(MFrom) But I am unable to compare them as follows: if CardA(TopC(MTo) + 1, MTo) = FreeCell(MFrom) then This always returns an error "type mismatch". The same happens for "<>". I h...
by RodSnow
Dec 05, 2008 2:00
Forum: Beginners
Topic: First Code and a long way to go, Your Opinion??
Replies: 20
Views: 3115

I apologize for not writing sooner. I just realized today that there was a page 2, and more had been added. I am new here. Type aCard ' Makes the model for the card information Rank as Integer ' 1 - 13 for Ace - King Suit as String ' Spad, Hear, Club and Diam for the Suits Color as String ' B for Bl...
by RodSnow
Dec 02, 2008 18:18
Forum: Beginners
Topic: First Code and a long way to go, Your Opinion??
Replies: 20
Views: 3115

Shuffling?

I don't need to shuffle the cards. I am writing this program to find solutions to the game "Free Cell" that came with the computer. Eventually I will need to add a subroutine that will let me enter the cards and their locations from the keyboeard. I am still working out the bugs that came with chang...

Go to advanced search