473,413 Members | 1,807 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

Perform action from Parsed content

I am looking to see if there is an example or pseudo code for how to have a
C# application read a text file and perform an action that is parsed from the
text file. For example
TestDoc.txt
================================

This is a list of values:

<# for (int i = 0; i < mylist.count; i++)
{
writeout( "parm[" + i + "] = " + myList[i] + "\n" )
}
#>
Input
================================
mylist[0] = "Hello World";
mylist[1] = "Goodbye World";

TestDoc_output.txt
================================
This is a list of values:

parm[0] = Hello World
parm[1] = Goodbye World
Mar 24 '06 #1
2 1209
IMO there are following ways how you can "execute" some kind of pseudo code.

1. Write translator from pseudo code to C#, then use System.CodeDom (
ICodeCompiler ) to compile the code, and finally load compiled assembly and
execute code.

2. Translate pseudo code into IL using System.Reflection.Emit and then
exucute

3. Microsoft.Vsa, however it uses predefined script language e.g. JavaScript
--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com

"Dave" <Da**@discussions.microsoft.com> wrote in message
news:83**********************************@microsof t.com...
I am looking to see if there is an example or pseudo code for how to have a
C# application read a text file and perform an action that is parsed from
the
text file. For example
TestDoc.txt
================================

This is a list of values:

<# for (int i = 0; i < mylist.count; i++)
{
writeout( "parm[" + i + "] = " + myList[i] + "\n" )
}
#>
Input
================================
mylist[0] = "Hello World";
mylist[1] = "Goodbye World";

TestDoc_output.txt
================================
This is a list of values:

parm[0] = Hello World
parm[1] = Goodbye World

Mar 25 '06 #2
Hi,

The following articles might help... They're *much more* than just
pseudocode :

1. http://www.codeproject.com/dotnet/Dy...pileAndRun.asp

2. http://www.codeproject.com/dotnet/evaluator.asp

3. Many more if you search for them... I can't seem to find my links
right now...

HTH,

Regards,

Cerebrus.

Mar 26 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sylvie Stone | last post by:
Hi group - I have an html form for that uses username and password to login to a specific area of the website. The "area" the user wants to go to is based on a pull down menu. Becasue the...
1
by: Y | last post by:
On a hired webserver, the php code that is in the files included with 'include_once' and 'include' command is not parsed. The php file which includes these parses just fine. The included php is...
3
by: | last post by:
I have created a web setup project for my ASP.NET application that works fine. Also, I have followed the instructions for using a custom action to launch a web page after the installation is...
12
by: TheOne | last post by:
In Asp.net web form under form tag there is action field that I am point to some other page, and not to same web form. When I run this page it is always pointing to itself. How do I get around...
4
by: Lee Chapman | last post by:
Hi, Can anyone tell me why in the code below, the call to ClearChildViewState() has no effect? To paraphrase the code: I'm using view state. I have a textbox and a submit button (and a label...
7
by: | last post by:
Hello, I would like to do the following from a asp.net button click: <form method="POST" action="https://www.1234.com/trans_center/gateway/direct.cgi"> <input type="hidden" name="Merchant"...
1
by: newcomer | last post by:
I have traced action in XML. Now I would like to replay that. How could I do that based on this XML trace? I am using soap:tcp between client and server. thanks,
3
by: Mani | last post by:
Hi I am trying to post the values to the form. The form action is not done in html i.e not in form tag, it is done by javascript code using document.FORMNAME.action = "results.asp"; I think...
6
by: Arthur | last post by:
Hello. How might it be possible to change where a form action is directed based on a selected option. For example I have this: <FORM METHOD = "post" ACTION = ""> And a drop down such as
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.