Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pls Help me? I am new to BASIC
#1
I want to get the location of \ character using MATCH. But match already contains \ as escape character.

Is it possible to get the location of \?

Can u help me?

e.g) I want to get the location of \ in the following path

c:\java\lib


Regards,
Nalini
alini
Reply
#2
Look up the INSTR command. It will tell you the first occourence of a specified character in a string, starting from a specified position.
Here is a link to the command
Reply
#3
Do you mean QBASIC or BASIC?

Maybe he's talking about some weird dialect of BASIC that has a MATCH function.
Reply
#4
Yep, Are you using Qbasic, mate? Because Ive never heard of a MATCH command for Qbasic before... is this Basic or GWBasic? of Firstbasic... or Powerbasic... or umm.. to many to comprehend..=P
Reply
#5
What is the evil J word doing there??
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#6
Um... think fast.... its **Coffee!!!** Yea.... thats it. He has a folder in his HDD devoted to coffee. Yup..

...

*Psst... you owe me one, mathuna...*
Reply
#7
Hm......

Ok then.

*lowers nuklear weapon*..
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#8
:rotfl:

*thinks aga should look "nuklear" up in dictionary* :lol:
Reply
#9
Here you go:

Location% = INSTR("c:\java\blah", "\")

This command will give only the first occurance of the "\" character =P.
Reply
#10
TBBQ: he already has been given the answer?? That is just a useless post.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)