Normal Topic Using Xpost (Read 736 times)
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Using Xpost
Sep 9th, 2004 at 5:14pm
Print Post Print Post  
Can't get Xpost to work:

My Code"If @add Then QtyIn = XPost(@Fn,ItemNumber,"Mastinv!Item Number",QtyIn,"Shop Qty","Add")

Error Message "Unknown Identifier Line 1 Position 22
[Identifer: Xpost]

Any Idea's

Thanks for all the Help !! Cheesy
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Using Xpost
Reply #1 - Sep 9th, 2004 at 5:23pm
Print Post Print Post  
XPost is not a function, it is subroutine. The crucial difference being that a subroutine does not return a value. So when you try to set "Qtyln" to the value returned by XPost, SBasic gives you a syntax error. Try:

Code
Select All
If(@add)
{
   XPost(@Fn,ItemNumber,"Mastinv!Item Number",QtyIn,"Shop Qty","Add")
}
 

  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: Using Xpost
Reply #2 - Sep 9th, 2004 at 5:33pm
Print Post Print Post  
Cheesy Cheesy Cheesy

  Worked like a charm !


  Made a note in the programming manual that it is a sub-Routine and not a function.

  Thanks Mark !!
  
Back to top
 
IP Logged