f



getting offset of the value instead of the value

Hello all,

I am very new to assembly programming. I'm trying to make a simple
program that has a "graph" feature in it. There is an array declared in
the DATA section, with length 26. It will contain the values for
drawing the graph. The graph is a 26 green column, the height of each
column will be loaded from the array.

The problem is: When I load the value from the array, I don't get the
value, instead, I get the offset of the value. At least that is what I
think, I might be mistaken, and as I said, I'm new to assembly, and
very poor in debugging. (BTW, what debugger do you recommend?)


// .. BEGIN OF CODE .. //
TITLE "PROJ"
..MODEL SMALL
..DATA
	STAT	DW	26 DUP(0)
..CODE

MYSTART MACRO
	MOV AX,0A000H
	MOV DS,AX
	CLD
	MOV AX,12H
	INT 10H
ENDM

MYEND MACRO
	PUSH AX
	MOV AH,1
	INT 21H
	MOV AX,3
	INT 10H
	POP AX
ENDM

DCOLUMN MACRO X, H
; This macro needs the position of the column and the height
; It will draw a green column.. I did test it with
; immediate values and it works fine
	PUSH SI
	PUSH BX
	PUSH CX
	PUSH DX
	MOV SI, X
	MOV BX, 440
	SUB BX, H
	MOV DL, 2
	MOV CX, H
	CALL BLOCK
	MOV AX, H
	POP DX
	POP CX
	POP BX
	POP SI
ENDM

DTEXT MACRO X, Y, C, STRING
	PUSH AX
	PUSH BX
	PUSH DX
	PUSH SI
	PUSH ES
	MOV AX, @DATA
	MOV ES, AX
	MOV BX, Y
	MOV SI, X
	MOV DL, C
	MOV DI, OFFSET STRING
	CALL PTEXT
	POP ES
	POP SI
	POP DX
	POP BX
	POP AX
ENDM


..STARTUP
	MYSTART

	; Fill the array with values 26 to 0
	; Question: Do I have to change DS to @DATA and then back to 0A000H?
	; Because I've changed DS at the begining of the code to 0A000H, to be
able to draw.
	MOV CX, 26
	MOV SI, 0
L:	MOV STAT[SI], CX
	INC SI
	LOOP L

	; Draw the graph, based on the value from the array stat
	; The problem is probably here... :-(
	; The value loaded from AX is not between 0 and 26!
	MOV CX, 26
	MOV DX, 22
	MOV SI, 0
A:	LEA AX, [STAT+SI]
	DCOLUMN DX, AX
	ADD DX, 2
	ADD SI, 2
	LOOP A

	MYEND
..EXIT

BLOCK PROC NEAR
; This procedure will draw a block of pixels with a specified
; color taken from DL. SI and BX are the X and Y coordinates,
respectively.
PUSH CX
PUSH DX
MOV DX,3CEH
MOV AL,8
OUT DX,AL
MOV DX,3CFH
MOV AL,0FFH
OUT DX,AL
MOV DX,3C4H
MOV AL,2
OUT DX,AL
MOV AX,80
MUL BX
MOV DI,AX
ADD DI,SI
MOV DX,3C5H
POP AX
PUSH AX
MOV AH,AL
BLOCK1:
MOV AL,0FH
OUT DX,AL
MOV AL,[DI]
MOV BYTE PTR [DI],0
MOV AL,AH
OUT DX,AL
MOV BYTE PTR [DI],0FFH
ADD DI,80
LOOP BLOCK1
POP DX
POP CX
RET
BLOCK ENDP

END
// .. END OF CODE .. //

0
spamtrap2 (1627)
5/16/2006 2:31:44 AM
comp.lang.asm.x86 5035 articles. 0 followers. Post Follow

2 Replies
720 Views

Similar Articles

[PageSpeed] 25

spamtrap@crayne.org wrote:
> Hello all,
> 
> I am very new to assembly programming. I'm trying to make a simple
> program that has a "graph" feature in it. There is an array declared in
> the DATA section, with length 26. It will contain the values for
> drawing the graph. The graph is a 26 green column, the height of each
> column will be loaded from the array.
> 
> The problem is: When I load the value from the array, I don't get the
> value, instead, I get the offset of the value. At least that is what I
> think, I might be mistaken,

Well... I haven't tried your code, but I don't *think* that's the problem...

> and as I said, I'm new to assembly, and
> very poor in debugging.

Practice, practice, practice! :)

> (BTW, what debugger do you recommend?)

I like David Lindauer's GRDB...

http://members.tripod.com/~ladsoft/grdb.htm

Borland's TD is good - might be better at debugging a graphics mode 
program...

> // .. BEGIN OF CODE .. //
> TITLE "PROJ"
> .MODEL SMALL
> .DATA
> 	STAT	DW	26 DUP(0)
> .CODE
> 
> MYSTART MACRO
> 	MOV AX,0A000H
> 	MOV DS,AX
> 	CLD
> 	MOV AX,12H
> 	INT 10H
> ENDM
> 
> MYEND MACRO
> 	PUSH AX
> 	MOV AH,1
> 	INT 21H
> 	MOV AX,3
> 	INT 10H
> 	POP AX
> ENDM
> 
> DCOLUMN MACRO X, H
> ; This macro needs the position of the column and the height
> ; It will draw a green column.. I did test it with
> ; immediate values and it works fine
> 	PUSH SI
> 	PUSH BX
> 	PUSH CX
> 	PUSH DX
> 	MOV SI, X
> 	MOV BX, 440
> 	SUB BX, H
> 	MOV DL, 2
> 	MOV CX, H
> 	CALL BLOCK
> 	MOV AX, H
> 	POP DX
> 	POP CX
> 	POP BX
> 	POP SI
> ENDM
> 
> DTEXT MACRO X, Y, C, STRING
> 	PUSH AX
> 	PUSH BX
> 	PUSH DX
> 	PUSH SI
> 	PUSH ES
> 	MOV AX, @DATA
> 	MOV ES, AX
> 	MOV BX, Y
> 	MOV SI, X
> 	MOV DL, C
> 	MOV DI, OFFSET STRING
> 	CALL PTEXT
> 	POP ES
> 	POP SI
> 	POP DX
> 	POP BX
> 	POP AX
> ENDM
> 
> 
> .STARTUP
> 	MYSTART
> 
> 	; Fill the array with values 26 to 0
> 	; Question: Do I have to change DS to @DATA and then back to 0A000H?
> 	; Because I've changed DS at the begining of the code to 0A000H, to be
> able to draw.

Yup, you sure do. You might be better off to set ds to your data segment 
(dos doesn't do this for an .exe file, but does for a .com file), and 
use es for your screen memory segment at 0A000h... Or fs or gs, if 
you're targetting 386+.

> 	MOV CX, 26
> 	MOV SI, 0
> L:	MOV STAT[SI], CX
> 	INC SI

Here's a real problem! You've got a "word array" - each entry takes up 
16 bits. You fill an entry with cx... fine... but then only increment si 
by 1 (8 bits). This overwrites the high byte of one entry with the low 
byte of the next, producing values that probably look a lot like 
offsets. You need to "add si, 2" - as you do below to retrieve the 
values from the array.

> 	LOOP L
> 
> 	; Draw the graph, based on the value from the array stat
> 	; The problem is probably here... :-(
> 	; The value loaded from AX is not between 0 and 26!
> 	MOV CX, 26
> 	MOV DX, 22
> 	MOV SI, 0
> A:	LEA AX, [STAT+SI]
> 	DCOLUMN DX, AX
> 	ADD DX, 2
> 	ADD SI, 2
> 	LOOP A
> 
> 	MYEND
> .EXIT
> 
> BLOCK PROC NEAR
> ; This procedure will draw a block of pixels with a specified
> ; color taken from DL. SI and BX are the X and Y coordinates,
> respectively.
> PUSH CX
> PUSH DX
> MOV DX,3CEH
> MOV AL,8
> OUT DX,AL
> MOV DX,3CFH
> MOV AL,0FFH
> OUT DX,AL
> MOV DX,3C4H
> MOV AL,2
> OUT DX,AL
> MOV AX,80
> MUL BX
> MOV DI,AX
> ADD DI,SI
> MOV DX,3C5H
> POP AX
> PUSH AX
> MOV AH,AL
> BLOCK1:
> MOV AL,0FH
> OUT DX,AL
> MOV AL,[DI]

I'm not sure what you're doing here.... You load al, but then alter it 
without using the value. Reading from video memory is slow as crap - 
avoid it if you can. I don't see that you need it here.

If you opt to set ds to your data segment, and use es (or fs or gs) for 
your video segment, you'll need a segment override here - "mov al, 
es:[di]" (or fs or gs)... if you do it at all...

> MOV BYTE PTR [DI],0

mov byte ptr es:[di], 0

> MOV AL,AH
> OUT DX,AL
> MOV BYTE PTR [DI],0FFH

and here...

> ADD DI,80
> LOOP BLOCK1
> POP DX
> POP CX
> RET
> BLOCK ENDP
> 
> END
> // .. END OF CODE .. //

I think your main problem is the way you fill the array. Setting ds to 
video memory (first) and then using it to access data is a problem, too. 
See if fixing those two things helps...

Best,
Frank

0
Frank
5/16/2006 4:38:57 AM
Dear Frank,

I literally cannot thank you enough. I have spent 4 days struggling
with this code.
THANK YOU!

Yours,
Naimi

0
spamtrap
5/16/2006 7:22:54 AM
Reply:

Similar Artilces:

get value of a single record instead of aggregated value with GROUP BY
How to get a record value instead of aggregated value with GROUP BY? Assume that I have a PRODUCT_COMMENT table defined as below. It logs the multiple comments for products. A product may have multiple comments logged at different time. CREATE TABLE [dbo].[PRODUCT_COMMENT]( [COMMENT_ID] [int] IDENTITY(1,1) NOT NULL, [PRODUCT_ID] [int] NOT NULL, [COMMENT] [nvarchar](50) NULL, [UPDATED_ON] [datetime] NOT NULL, CONSTRAINT [PK_PRODUCT_COMMENT] PRIMARY KEY CLUSTERED ( [COMMENT_ID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO ALTER TABLE [dbo].[PRODUCT_COMMENT] WITH CHECK ADD CONSTRAINT [FK_PRODUCT_COMMENT_PRODUCT] FOREIGN KEY([PRODUCT_ID]) REFERENCES [dbo].[PRODUCT] ([PRODUCT_ID]) GO ALTER TABLE [dbo].[PRODUCT_COMMENT] CHECK CONSTRAINT [FK_PRODUCT_COMMENT_PRODUCT] I would like to use the following SQL statement to get the latest comment for all products. SELECT PRODUCT_ID, COMMENT, UPDATED_ON FROM PRODUCT_COMMENT GROUP BY PRODUCT_ID HAVING UPDATED_ON = MAX(UPDATED_ON) But this leads to the following error: Column 'PRODUCT_COMMENT.UPDATED_ON' is invalid in the HAVING clause because it is not contained in either an aggregate function or the GROUP BY clause. Is there a way to do that? Thanks! On Thu, 11 Oct 2007 23:47:18 -0700, blackpuppy <mingzhu.z@gmail.com> wrote: >I would like to use the following SQL statement to get the la...

Getting values in between the values of a vector?
Say I have a vector that's like this: [-6 -3 0 3 6] How can I get it get the number in between each of the two values to return something like: [-4.5 -1.5 1.5 4.5] Is there a built-in function that can do this? I'm asking because I'd like to avoid a loop if possible (but I'm thinking it's the only way). Thanks! "Brandon Rodriguez" <coasters2k@yahoo.com> wrote in message <gsfp69$19b$1@fred.mathworks.com>... > Say I have a vector that's like this: > > [-6 -3 0 3 6] > > How can I get it get the number in between each of the two v...

Value if _page_ value into another value??
I am trying to get my Mtitle and Footer with in the dataset Instead of getting them as title and Footnotes the reason My boss requested (there is Other reason ) For that I am doing something like this My Problem is trying to get Titles in the Dataset, When I trying something like this The second title is Over writing the First one. But I need my Report some thing like this . Is there is something similar to *compute before _page_ or can I have value of _page_ into some other value.* MYPHARMA Page 1 of 3 . PEN 20007 Table 14.1.4 Demographic Characteristics Modified Intent-To-Treat Subjects /* CREATE REPORT */ ods rtf file = "&dir1.T14_1_2_MXXX_1303.RTF" style=autoexec; title "" ; Footnote"" ; proc report data= &Program. nowd missing split='?' style(header)=[protectspecialchars=off]; columns ("&border" (page _userFoot _PageNo _lastLine Sec Row Col0 Col2_1 Col2_1 Col2_2 Col2_3 Col2_4 )); define _userFoot / order Noprint ; define _PageNo / order Noprint ; define _lastLine / order Noprint ; define page/ order order=internal noprint; define Sec/ order noprint; define Row/ order noprint; define Col0 / display "Variable" style=[cellwidth=2.1in] style(header)=[just=left]; define Col2_1 /display "Placebo?(N=%cmpres(&all_plac.))&quo...

value labels in charts instead of values
Hi everybody! I've entered some (ordinal) data in SPSS. When SPSS draws a histogram it shows values instead of value labels. Is there a simple way to change this? Gert-Jan Gert-Jan Schoenmakers wrote: > Hi everybody! > > I've entered some (ordinal) data in SPSS. When SPSS draws a histogram it > shows values instead of value labels. Is there a simple way to change this? > > Gert-Jan > > Histograms are appropriate for interval or ratio scale variables. I would use a bar chart to display the distribution for an ordinal variable. IIRC, the value labels will appear on a bar chart. Cheers, Bruce -- Bruce Weaver weaverb@mcmaster.ca www.angelfire.com/wv/bwhomedir/ Go to Edit | Options, select the Output tab, find the combo boxes that control how output is formatted, and select values, labels, or both (I use both, personally). It will take effect on the next procedure or when a new output window is raised. D Hi Dana! "Dana Broach" <dbroach@cox.net> wrote in message news:p%LZb.5737$nI1.3771@okepread05... > Go to Edit | Options, select the Output tab, find the combo boxes that > control how output is formatted, and select values, labels, or both (I use > both, personally). It will take effect on the next procedure or when a new > output window is raised. I also tried this, but unfortunately this will not work in SPSS 'Graphs' menu. Bruce's so...

Re: Value if _page_ value into another value??
On Mon, 3 Dec 2007 23:25:03 -0500, SAS_learner <proccontents@GMAIL.COM> wrote: >I am trying to get my Mtitle and Footer with in the dataset Instead of >getting them as title and Footnotes the reason My boss requested (there is >Other reason ) For that I am doing something like this > >My Problem is trying to get Titles in the Dataset, When I trying something >like this The second title is Over writing the First one. But I need my >Report some thing like this . Is there is something similar to *compute >before _page_ or can I have value of _page_ into some other value.* > >MYPHARMA >Page 1 of 3 . >PEN 20007 > > > Table 14.1.4 > Demographic >Characteristics > Modified Intent-To-Treat >Subjects > >/* CREATE REPORT */ >ods rtf file = "&dir1.T14_1_2_MXXX_1303.RTF" style=autoexec; >title "" ; >Footnote"" ; >proc report data= &Program. nowd missing split='?' >style(header)=[protectspecialchars=off]; > columns ("&border" (page _userFoot _PageNo _lastLine Sec Row Col0 Col2_1 >Col2_1 Col2_2 Col2_3 Col2_4 )); > define _userFoot / order Noprint ; > define _PageNo / order Noprint ; > define _lastLine / order Noprint ; > define page/ order order=internal noprint; > d...

Display approximate values instead of exact values
Relatively new to Matlab - I've been using it on and off for a few years now. I'm trying to solve an equation: solve(sqrt(k)*(sqrt(k)-2)^2 - 4, k) and when I do, matlab gives me a 3 x 1 array of answers in this format: (4/(9*((27^(1/2)*76^(1/2))/27 + 46/27)^(1/3)) + ((27^(1/2)*76^(1/2))/27 + 46/27)^(1/3) + 4/3)^2 (3^(1/2)*4*i - 3^(1/2)*((27^(1/2)*76^(1/2))/27 + 46/27)^(2/3)*9*i - 24*((27^(1/2)*76^(1/2))/27 + 46/27)^(1/3) + 9*((27^(1/2)*76^(1/2))/27 + 46/27)^(2/3) + 4)^2/(324*((27^(1/2)*76^(1/2))/27 + 46/27)^(2/3)) (9*((27^(1/2)*76^(1/2))/27 + 46/27)^(2/3) + 3^(1/2)*((27...

How to get inimum value from 16 values available
Dear all, I've a specific problem. Hope some one will answer me. I have a color image, say img1, of 512 X 512 size in CIELAB space. For each pixel in img1, I've 16 sample pixels approximated as follows (E1 is another image obtained by some process) Lp1(x,y) = img1(x,y,1); ap1(x,y) = img1(x,y,2) + E1(x,y); bp1(x,y) = img1(x,y,3); Lp2(x,y) = img1(x,y,1); ap2(x,y) = img1(x,y,2) + E1(x,y)/sqrt(2); bp2(x,y) = img1(x,y,3) + E1(x,y)/sqrt(2); Lp3(x,y) = img1(x,y,1); ap3(x,y) = img1(x,y,2); ...

Re: Value if _page_ value into another value?? #3
Check out the ODS RTF TEXT=, which allow you to write stuff in the main body of the document. But text is still put into a cell like thing. you will see a border around the text, but it wil be invisible when you print it out. Not sure if it will solve your problem. HTH Yu On Dec 4, 2007 8:23 AM, SAS_learner <proccontents@gmail.com> wrote: > Tom, > > Thank you for the Reply, I know what you are saying defining Footnotes and > Titles Outside would send it RTF Part. > > But my Medical Writers are having a Problem while doing their changes to > delete the header and footer part when it is written Out by RTF , > > That is Reason I need Footnotes and titles inside the Dataset so that it > would be easy for them > > thanks > Kumar > > On Dec 4, 2007 5:11 AM, Tom Hide <tom.hide@dehiworld.com> wrote: > > > On Mon, 3 Dec 2007 23:25:03 -0500, SAS_learner <proccontents@GMAIL.COM> > > wrote: > > > > >I am trying to get my Mtitle and Footer with in the dataset Instead of > > >getting them as title and Footnotes the reason My boss requested (there > > is > > >Other reason ) For that I am doing something like this > > > > > >My Problem is trying to get Titles in the Dataset, When I trying > > something > > >like this The second title is Over writing the First one. But I need > my > > >Report some thing like this . Is there is ...

how to catch a value from radio buttom getting its value from mysql?
Hi, this is a newbie question. How can I catch the selected radio value from a form that is feed by the mysql database? EX.: <input type="radio" name="myname" value="<?php $myvalue[3] ?>"> Value returns the last element of the array $myvalue[3] instead of the selected value. How can I change this? Thanks in advance for any help, Guillermina echo? <input type="radio" name="myname" value="<?php echo $myvalue[3] ?>"> PWT "gmanon" <guillermina@nyc.rr.com> wrote in message news:3FAC73F3.4000602@nyc.rr.com... > Hi, this is a newbie question. > > How can I catch the selected radio value from a form that is feed by the > mysql database? > > EX.: > <input type="radio" name="myname" value="<?php $myvalue[3] ?>"> > > Value returns the last element of the array $myvalue[3] > instead of the selected value. > > How can I change this? > > Thanks in advance for any help, > > > Guillermina > Yes, I'm using echo. May that be the problem? Should I use print or printf instead? Guillermina Peter Taurins wrote: > echo? > > <input type="radio" name="myname" value="<?php echo $myvalue[3] ?>"> > > PWT > > "gmanon" <guillermina@nyc.rr.com> wrote in message > news:3FAC...

Displaying value instead of value labels in Frequencies command
Hi all, Is it possible to display values instead value lables in Frequencies command. I don't want to delete all val labs. On the other hand i cannot use temp. val lab v1 '' or something else, because i already use temp. for declaring temporary missing values. Thanx. Gordan Gordan wrote: > Hi all, > > Is it possible to display values instead value lables in Frequencies > command. I don't want to delete all val labs. > On the other hand i cannot use > temp. > val lab v1 '' or something else, > because i already use temp. for declaring temporary missing values. > > Thanx. > > Gordan Why not just compute a new variable that doesn't have the value labels? compute tempv1 = v1. format tempv1 (whatever format you want here). missing values tempv1 (list of missing values). freq tempv1. -- Bruce Weaver bweaver@lakeheadu.ca www.angelfire.com/wv/bwhomedir > > Why not just compute a new variable that doesn't have the value labels? > > compute tempv1 = v1. > format tempv1 (whatever format you want here). > missing values tempv1 (list of missing values). > freq tempv1. Good idea, Thanx Gordan Go to Edit/Options/Output Labels. You will see a number of choices for whether values or labels are displayed in pivot tables and outlines. Regards, Jon Peck SPSS > Go to Edit/Options/Output Labels. You will see a number of ch...

how to get approximate differential value from pure mesh values
I have function numerical values on a uniform mesh points. But I do not know the explicit form of this function. Now the approximate value of first or second order derivative is wanted. Does there exist a Matlab funtion to do this? Otherwise any suggestions are welcome. suniuin wrote: > I have function numerical values on a uniform mesh points. But I do > not know the explicit form of this function. Now the approximate > value of first or second order derivative is wanted. > > Does there exist a Matlab funtion to do this? Otherwise any > suggestions are welcome. finite di...

Get x values for specific y value of the histogram
I have the histogram of an image and I want to know the x values that corresponds to specific y values. For example I want the x values that corresponds to the values that I stored in an array A. P.S: the x values of histogram are 0:255 (for Matlab is 1:256) and the y values can be any number from 0 to hundrends Thank you for your help ...

href values and value-of
Hello. I am creating an xml list of links with structure like the below: <item> <title>Bullet Madness</title> <uri>http://www.stylegala.com/archive/bulletmadness/</uri> <description>200 bullets, each of them nice in their own way</description> </item> I need to create a link with that data. When I tried to do something like <a href="<xsl:value-of select="uri">">text</a> I got the error that the structure was not well formed. How else would I create a link with proper structure? Thanks, Dante Dante (29 Sep 2004 20:46:59 -0700): > <item> > <title>Bullet Madness</title> > <uri>http://www.stylegala.com/archive/bulletmadness/</uri> > <description>200 bullets, each of them nice in their own > way</description> > </item> > > I need to create a link with that data. When I tried to do something > like > <a href="<xsl:value-of select="uri">">text</a> <a> <xsl:attribute><xsl:value-of select="uri"/></xsl:attribute> text </a> Chris -- Chris Huebsch www.h�bsch-gemacht.de | TU Chemmnitz, Informatik, RNVS GPG-Encrypted mail welcome! ID:7F2B4DBA | Str. d. Nationen 62, B204 Chemnitzer Linux-Tage 2005, 5.-6.M�rz | D-09107 Chemnitz http://chemnitzer.linux-tage.de/ | +49 371 531-1377, Fax -1803 Dante (pianoman@reno.com) wr...

Re: Value if _page_ value into another value?? #2
Tom, Thank you for the Reply, I know what you are saying defining Footnotes and Titles Outside would send it RTF Part. But my Medical Writers are having a Problem while doing their changes to delete the header and footer part when it is written Out by RTF , That is Reason I need Footnotes and titles inside the Dataset so that it would be easy for them thanks Kumar On Dec 4, 2007 5:11 AM, Tom Hide <tom.hide@dehiworld.com> wrote: > On Mon, 3 Dec 2007 23:25:03 -0500, SAS_learner <proccontents@GMAIL.COM> > wrote: > > >I am trying to get my Mtitle and Footer with in the dataset Instead of > >getting them as title and Footnotes the reason My boss requested (there > is > >Other reason ) For that I am doing something like this > > > >My Problem is trying to get Titles in the Dataset, When I trying > something > >like this The second title is Over writing the First one. But I need my > >Report some thing like this . Is there is something similar to *compute > >before _page_ or can I have value of _page_ into some other value.* > > > >MYPHARMA > >Page 1 of 3 . > >PEN 20007 > > > > > > Table 14.1.4 > > Demographic > >Characteristics > > Modified Intent-To-Treat > >Subjects > > > >/*...

Values depending on other values
Hi all, I have to insert some rows in a database and some values in this rows depends on the values of other rows in the database. This new value must continue up to date dependig on the value of the origin data. �How could I do this? I�ve been thinking of using triggers that update the variable values but, is there any other way? Thanks in advance NegreT wrote: > Hi all, > > I have to insert some rows in a database and some values in this rows > depends on the values of other rows in the database. > > This new value must continue up to date dependig on the value of the > origin data. > > �How could I do this? I�ve been thinking of using triggers that update > the variable values but, is there any other way? > > Thanks in advance You should almost never store the result of a calculation in a relational database. Why not calculate the value on the fly for display on screen or in reports? -- Daniel Morgan http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp damorgan@x.washington.edu (replace 'x' with a 'u' to reply) Hi Daniel, thanks for your reply. The situation is : - I've got a table with records (each record is a state of a sensor). - I've got a form that reads those records and can add more. What I have to do: - Users must be able to insert records with the current value of the sensor (easy). - Users must be abl...

Re: Value if _page_ value into another value?? #4
On Tue, 4 Dec 2007 08:30:48 -0600, Yu Zhang <zhangyu05@GMAIL.COM> wrote: >Check out the ODS RTF TEXT=, which allow you to write stuff in the main body >of the document. But text is still put into a cell like thing. you will see >a border around the text, but it wil be invisible when you print it out. Not >sure if it will solve your problem. > >HTH > >Yu > >On Dec 4, 2007 8:23 AM, SAS_learner <proccontents@gmail.com> wrote: > >> Tom, >> >> Thank you for the Reply, I know what you are saying defining Footnotes and >> Titles Outside would send it RTF Part. >> >> But my Medical Writers are having a Problem while doing their changes to >> delete the header and footer part when it is written Out by RTF , >> >> That is Reason I need Footnotes and titles inside the Dataset so that it >> would be easy for them >> >> thanks >> Kumar >> >> On Dec 4, 2007 5:11 AM, Tom Hide <tom.hide@dehiworld.com> wrote: >> >> > On Mon, 3 Dec 2007 23:25:03 -0500, SAS_learner <proccontents@GMAIL.COM> >> > wrote: >> > >> > >I am trying to get my Mtitle and Footer with in the dataset Instead of >> > >getting them as title and Footnotes the reason My boss requested (there >> > is >> > >Other reason ) For that I am doing something like this >> > > >> > >My Proble...

VALUES and CALL-WITH-VALUES
I want to know why VALUES and CALL-WITH-VALUES are necessary in Scheme. They seem to have no meaning independently. Aren't the following simple macros are sufficient? From a practical point of view such as variable bindings, the latter macros are rather better than the former procedures. (define-syntax mu (syntax-rules () ((mu argument ...) (lambda (m) (m argument ...))))) (define-syntax nu (syntax-rules () ((nu argument arguments ...) (lambda (n) (apply n argument arguments ...))))) ((mu 1 2 3) +) => 6 (call-with-values (lambda () (values 1 2 3)) +) => 6...

Get value from table upon changing value in combo box.
I'm working on a form where a combo box gets its list of values from a table. That same table also contains some "default notes" in other fields. My task is simple, but I'm having a hard time working it out. Once an option is selected in the combo box, I want to run (a macro?) that will grab the appropriate default notes from the table, and load them into the form in the various Notes fields. I've got a query set up that'll narrow the table down to the option selected in the combo box, but when I use the SetValue action in the macro, I get an error saying that I'm trying to use a table that is not available for automation. Right now my SetValue action is set up like this: Item = [Forms]![FormMain]![Notes1TXT] Expression = [ComboTable]![DefaultNote1] Questions: 1. Can tables be referenced at all in SetValue actions in Macros? That seems to be the hang up? 2. Is there a better way to go about this entirely? Thanks in advance. Please email response to timothydavie@gmail.com. Thanks! :-) On Jun 6, 10:39=A0am, Tim <timothyda...@gmail.com> wrote: > I'm working on a form where a combo box gets its list of values from a > table. That same table also contains some "default notes" in other > fields. My task is simple, but I'm having a hard time working it out. > Once an option is selected in the combo box, I want to run (a macro?) > that will grab the appropriate default notes from the table, and load > them i...

Access 97 Passing NULL Value Instead of Actual Value
Hi All, Have you ever seen this problem with Access 97 running on Win2K? From my Access application, a user enters information into two fields and then clicks on a button that launches their web browser and sends them to a specific URL. The query string of the URL contains the information the user entered in those fields. A normal URL looks something like: http://127.0.0.1/display.jsp?name1=val1&name2=val2 In a lot instances after the user enters the information in the two fields and clicks on the button, the values that the user entered are NULL instead of the proper values. So the URL looks something like: http://127.0.0.1/display.jsp?name1=null&name2=null Sometimes it works fine the first time the user clicks the button. Sometimes it takes 3 or 4 clicks of the button before the application sends the information correctly in the URL. There is no consistency to the problem and I am having a hard time figuring it out. If it helps at all, I am making a call to Application.FollowHyperlink in my Access application to send the user to the URL, although I do not suspect that to be the problem. Thanks in advance for any help. Rich Rich: Could you send the exact code you are using? Good Luck Ira Solomon On 9 Jul 2003 09:48:24 -0700, dejagroup@yahoo.com (Rich G) wrote: >Hi All, > >Have you ever seen this problem with Access 97 running on Win2K? > >From my Access application, a user enters information into two fields >and then clicks on a but...

return a value from a table if value from another table is between two values
I'm really unsure about what this might be called: i have a table (tblMdfRate) with feilds MdfRateUpper, MdfRateLower and MdfRateAmt i want to return MdfRateAmt when a customer's sales (SalesAmt in table tblSalesByDateRange) are between MdfRateUpper and MdfRateLower. I think i have done this before but i dont work with access on a daily basis and i have forgotten.... im sure it is a simple thing? SELECT tblSalesByDateRange.SalesAmt, tblMdfRate.MdfRateAmt FROM tblSalesByDateRange INNER JOIN tblMdfRate ON ( tblSalesByDateRange.SalesAmt >= tblMdfRate.MdfRateLower AND tblSalesByDateRange.SalesAmt <= tblMdfRate.MdfRateUpper ) ...

SortedMap: getting value for largest key less or equal a given value...
I've got an approach like the following, but I'm not entirely happy with it. (see embedded comments) Error checking left out only for brevity-of-post's sake. <sscce> class StepFunction<K,V> { SortedMap<K,V> m_map = new TreeMap<K,V>(); public void put(K k,V v) { m_map.put(k,v); } // for demo-fill /** @return the value for the largest key in the map that is less OR equal to the given parameter. */ public V value(K k) { // not really correct for generic use. In my usecase, K is // actually Long, so I just add one to k to make it work. return m_map.get(m_map.headMap(k).lastKey()); // I'm a bit unhappy about headMap's "open end", // and also about the lack of some method like // lastEntry() or lastKeysValue() in SortedMap, // requiring one to look up the lastKey in the map, // although the map had "its finger on it" just before. // Did I miss something simple and obvious? } // demo-helper void checkVal(K k, V v) { System.out.println( map.value(k) + " should be " + v); } public static void main(String[] args) { StepFunction<Integer,Double> sf = new StepFunction<>() sf.put(Integer.MIN_VALUE, -1.0); sf.put(0, 0.0); sf.put(2, 1.0); sf.checkVal(-1 , -1.0); sf.checkVal( 0 , 0.0); sf.checkVal( 1 , 0.0); sf.checkVal(...

how to get a matrix which its value inside this matrix is random value between -5 and 5?
dear all sorry just now put a blur message. what i mean just now is i would like to get a matrix which its values inside this matrix is random values between -5 and 5. thanks zhiyuan help rand ...

Newbie Help
I have a program that uses PHP to save and read data from a text file on a webserver. When I lauch the program (from a menuing system) the data is read in. A sample file would look something like this: 01/23/06 --data started --date completed 01/23/06 --last acccess 5658.12536 --timeontask 15 --last page While in the program some of these values will change, and when the program is exited, the new values will be saved back to the text file. The program saves the data in the textfile correctly and the file when viewed through IE shows this (which are the updated values): 01/23/06 01/24/06 01/24/06 74548.0458 29 The problem happens when I try to read in the file back in the menuing system to see if the assignment is complete (the second line has a value). The menuing system is reading in the original data and not the updated data, like the old data file is being stored in a cache. If i completly close out the program which is embedded in an IE window, and then I relaunch the program, the updated data will be read in. Any ideas would be greatly appreciated. Chris You are looking at a cached page (from IE). Try setting your cache setting to check for new versions of the page everytime. Dips (nospam) wrote: > > I have a program that uses PHP to save and read data from a text file on a > webserver. When I lauch the program (from a menuing system) the data is > read in. A sample file would look something like this: > >...

Value in combo box determines which value (from two fields) get printed on report
I have an autograph database. I have a combo box field ("Object") with such values as "Signed Card", "Personally Inscribed Photo" and "Signed Photo". This tracks what kind of autograph I received. I have two currency fields: "Signature Value" and "Photo Value" that show estimated values of a signature or signed photo. The first is the value of a signature, and the second is the value of a signed photo. I want to be able to generate a report where the value of one of the two currency fields prints based on the value in the Object field. For example, If Object="Signed Card", then "report value" is from that record's "Signature Value" field. If Object="Signed Photo", OR "Personally Inscribed Photo", then "report value" is from the "Photo Value" field. Or maybe If Object Contains "Photo", then "report value" is from the "Photo Value" field. Is this possible? All relevant fields are in the Autograph table. Thanks. Ken Anybody? kjacobs@eudoramail.com (Ken) wrote in message news:<4afebe35.0308040530.7789e758@posting.google.com>... > I have an autograph database. I have a combo box field ("Object") with > such values as "Signed Card", "Personally Inscribed Photo" and "Signed > Photo". This tracks what kind of autograph I received. I have two > currency fiel...

Web resources about - getting offset of the value instead of the value - comp.lang.asm.x86

Jennifer Garner Paints Easter Eggs in Park Ahead of Holiday
Jennifer Garner flashes a giddy grin as she paints Easter eggs on Saturday (March 26) in Los Angeles. The 43-year-old actress enjoyed a sunny ...

Bernie Sanders Wins Washington and Alaska Democratic Caucuses
Bernie Sanders scored big wins over Hillary Clinton in Washington state and Alaska on Saturday. in Alaska, Sanders took 82 percent of the vote ...

Stasi: Ted Cruz had five mistresses? I can't find one woman who would sleep with him
New York Daily News Stasi: Ted Cruz had five mistresses? I can't find one woman who would sleep with him New York Daily News The National ...

'The LEGO Batman Movie' Trailer Reheats Some Lobster, Drops the Mic
Easily one of the best parts of The LEGO Movie , besides pretty much everything, was Will Arnett as LEGO Batman. The overtly dark and jerkish ...

Rob Reiner Puts The Smackdown On Georgia and North Carolina Over Anti-Gay Law
Rob Reiner is boycotting North Carolina, and potentially Georgia too, saying he won’t be making any more films there until he sees an end to ...

Ryan Arcidiacono Seals Villanova Final Four Berth With Strip Of Frank Mason III
Ryan Arcidiacono has been huge for Villanova over the past few years, and he came up big for the Wildcats again Saturday night. Villanova is ...

De Niro’s Tribeca festival pulls anti-vaccination film
NEW YORK (AP) — Robert De Niro is removing the anti-vaccination documentary “Vaxxed” from the lineup of his Tribeca Film Festival, after initially ...

Rolling Stones make history with Cuba concert
The group became the first major international rock band to play in Cuba.

Hugh Jackman rescues 15-year-old son from riptide
The 47-year-old actor jumped into action Saturday afternoon after he, his 15-year-old son Oscar and fellow swimmers got stuck in a riptide while ...

Four Die in Medical Helicopter Crash in Alabama
NBCNews.com Four Die in Medical Helicopter Crash in Alabama NBCNews.com A medical flight in Alabama turned tragic when the helicopter crashed ...

Resources last updated: 3/27/2016 5:12:20 AM