Transformer Stage Functions
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Try replacing the constant in the pattern ("V") with " V".vick wrote:Thanks a ton Ray!
I plugged in your code and concatenated with "V-" and it works great except for 5 & 6. (Values after ----------------> are the results)
How do you account for when the data is similar to 5 & 6 (When V6 or V-12 comes in before the word "Valve")Code: Select all
1. "3.5 L V6 24-Valve DOHC" ---------------------> V-6 2. "3.8 L V-6 24-Valve DOHC" ---------------------> V-6 3. "4.6 L V8 w/4 valve per CYL" -------------------> V-8 4. "5.5 L 32-Valve Aluminum V-12"----------------> V-12 5. "5.9 L V-12 32-Valve Aluminum"----------------> V- 6. "3.9 L V6 32-Valve Aluminum"------------------> V- 7. "AMG 5,439-cc 24-Valve Supercharged"-------> Null
Any suugestions?
TIA
Code: Select all
If InLink.Product Matches "0X' V'1N0N0X" Then MatchField(InLink.Product, "0X' V'0N0X", 3) Else If InLink.Product Matches "0X' V-'1N0N0X" Then MatchField(InLink.Product, "0X' V-'0N0X", 3) Else @NULL
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Thinking of a word that rhymes with "anchor" but isn't "banker".vick wrote:My team lead has decided not to go with BASIC Tfr as he needs this to be a pristine DS-EE environment.
The DS-EE environment includes the BASIC Transformer stage. Therefore including such a stage does not in any way detract from your environment being pristine.
What we have with the BASIC Transformer stage is a tool that can do the job and which is part of the toolset. Now there's a requirement to develop in a language with which no-one on the team is familiar. What's wrong with this picture?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Well, its kind of hard to teach you a new language just through description. You have to go through language syntax, create your first program "Hello World", go through some functions etc etc etc.
Ill give you a piece of code, you can go through it, google up the functions, see what they do.
The description for each and every function used in the code above can be googled up. C has been around for ages and hence a lot of information present on the web.
Ill give you a piece of code, you can go through it, google up the functions, see what they do.
Code: Select all
//header files
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
//Main Function
char* GetEngineInfo(char* inp)
{ //Declare Variables
const int SIZE = 100;
char* out = (char *)malloc (SIZE);
char* x = (char *)malloc (SIZE);
char* p = (char *)malloc (SIZE);
int i = 0;
//Check if input is empty
if (strlen(inp) < 1)
return NULL;
//Strip out the literal "Valve"
x = strstr(inp, "Valve");
if(x)
strncpy(x, " ",5);
//Look for character "V". If not found then search for "V-"
p = strstr(inp, "V");
if(!p)
p = strstr(inp, "V-");
//If either "V" or "V-" are found get everything untill you hit space
if(p)
{
while(strncmp(p, " ", 1) != 0 )
{
out[i++]=*p++;
}
out[i] = '\0'; //terminate string
}
//Return NULL if not found
else
{
strcpy(out,NULL);
}
return out;
}
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.