T
Trevnal
Hi,
I was hoping some one may be able to help me. I am trying to get a piece of
code to work, which I thought I had right. But as far as I can tell, it does
not do anything when I run it in jBuilder.
I want to make sure the string that is collected from Keyboard.getString is
a upper case letter and the total length of the string is 8 characters long.
int len;
boalean validName = true;
aa = Keyboard.getString();
while (!aa.equals("ZZZ"))
{
do
{
len = partNumber.length();
{
if (!len == 8)
{
validName = false
}
}
}
while (validName = false)
do
{
for (int index = 0; index <2; index ++)
{
if (aa.substring(index,index+1) <"A" \\
(aa.substring(index,index+1) >"Z")
{
validName = false;
}
}
}
while (validName = false)
do
{
for (int index = 1; index <3; index ++)
{
if (aa.substring(index,index+1) <"0" \\
(aa.substring(index,index+1) >"100")
{
validName = false;
}
}
}
while (validName = false)
partIn[index] = new Part();
partIn[index].setPartNumber(partNumber);
}
rest of code.
thanks
Hobbit
I was hoping some one may be able to help me. I am trying to get a piece of
code to work, which I thought I had right. But as far as I can tell, it does
not do anything when I run it in jBuilder.
I want to make sure the string that is collected from Keyboard.getString is
a upper case letter and the total length of the string is 8 characters long.
int len;
boalean validName = true;
aa = Keyboard.getString();
while (!aa.equals("ZZZ"))
{
do
{
len = partNumber.length();
{
if (!len == 8)
{
validName = false
}
}
}
while (validName = false)
do
{
for (int index = 0; index <2; index ++)
{
if (aa.substring(index,index+1) <"A" \\
(aa.substring(index,index+1) >"Z")
{
validName = false;
}
}
}
while (validName = false)
do
{
for (int index = 1; index <3; index ++)
{
if (aa.substring(index,index+1) <"0" \\
(aa.substring(index,index+1) >"100")
{
validName = false;
}
}
}
while (validName = false)
partIn[index] = new Part();
partIn[index].setPartNumber(partNumber);
}
rest of code.
thanks
Hobbit