Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Word_Inline Comand Help

Author
Message
Nerd In Training
16
Years of Service
User Offline
Joined: 13th Feb 2010
Location:
Posted: 6th Feb 2011 17:29
What is the word_inline command, and how do you use it?

If x=y then we're all doomed.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 7th Feb 2011 18:41
Never heard of it. Perhaps you can post an example and tell us which plug-in provides it?

Nerd In Training
16
Years of Service
User Offline
Joined: 13th Feb 2010
Location:
Posted: 9th Feb 2011 21:09
Here's the code were I found it


If x=y then we're all doomed.
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 9th Feb 2011 21:35
It's not a command, it's referring to another piece of code. If you look at the bottom of that code you'll see this:


That means that that piece of code will run whenever you write word_inline. Take this simpler example:



That will print out the numbers 5 and 2, since 2 + 3 = 5 and 1 + 1 = 2.

[b]
revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 9th Feb 2011 21:42 Edited at: 9th Feb 2011 21:44
That is no command, It is the function at the bottom of your code
It accepts two strings, and sees if the second string appears anywhere in the first string. Ex: word_inline("FIREWOOD","FIRE")=1, since "FIRE" is the first 4 letters of "FIREWOOD".

[EDIT] Diggsey beat me too it!! [/EDIT]
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 9th Feb 2011 21:47 Edited at: 9th Feb 2011 21:53
That's not a command that's a function. What it does is looks at the first string for the word that's in the second string and gives a 0 if there's no match and a 1 if there is a match.



There are faster, easier, and more powerful methods using IanMs Matrix 1 Utilities Plugin instead:



If you don't have it already add IanMs Matrix 1 Utilities Plugin to unleash Darkbasic Pros full potential.

http://forum.thegamecreators.com/?m=forum_view&t=85209&b=18

Edit: Ack, I'm either the slowest at typing or the most long winded message writer. Well, there you go 3 confirmations that it's a function and not a command.

Login to post a reply

Server time is: 2026-07-16 04:35:41
Your offset time is: 2026-07-16 04:35:41