|
-
Oct 15th, 2002, 02:11 PM
#12
Ok, I looked at the download, though I had to use Notepad, which sucks.
The code, as it currently stands, looks like it will build an equation character by character, then write the equation into a textbox when the user presses the EXE button.
Would I be correct in assuming that what you want to do is write the evaluated equation?
If that is the case, I would suggest that the first step is to go through the array turning the characters for the numbers into actual numbers.
Code:
dim x as long
dim st1 as string
dim d as double
dim array2() as double
dim array3() as string
dim n as long
for x=1 to ubound(iarray)
if iarray(x)='some expression which includes only numeric and '.'.
st1=st1 & iarray(x)
else
n=n+1
redim preserve array2(n)
array2(n)=val(st1)
st1=""
redim preserve array3(n)
array3(n)=iarray(x)
end if
(first time using code formatting, hope it is readable)
The idea is to turn the array of characters into two arrays. The first array holds numbers, while the second array holds operators.
This is where the earlier posts come in. If you could put numbers or operators into objects, you could have one array.
Am I getting closer?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|