Determining Current Block and Current Item in Oracle Forms

本文介绍了Oracle Forms中用于确定当前导航单元的系统变量SYSTEM.CURSOR_BLOCK和SYSTEM.CURSOR_ITEM。通过具体示例展示了如何使用这些变量来实现不同块间的导航及获取焦点所在项。

SYSTEM.CURSOR_BLOCK

Determining current block in Oracle Forms Using SYSTEM.CURSOR_BLOCK system variable. The value that the SYSTEM.CURSOR_BLOCK system variable represents depends on the current
navigation unit:
If the current navigation unit is the block, record, or item (as in the Pre- and Post- Item, Record, and Block triggers), the value of SYSTEM.CURSOR_BLOCK is the name of the block where the cursor is located. The value is always a character string. If the current navigation unit is the form (as in the Pre- and Post-Form triggers), the value of SYSTEM.CURSOR_BLOCK is NULL.

SYSTEM.CURSOR_BLOCK examples

Assume that you want to create a Key-NXTBLK trigger at the form level that navigates depending on what the current block is. The following trigger performs this function, using :SYSTEM.CURSOR_BLOCK stored in a local variable.

DECLARE
curblk VARCHAR2(30);
BEGIN
curblk := :System.Cursor_Block;
IF curblk = ’ORDERS’
THEN Go_Block(’ITEMS’);
ELSIF curblk = ’ITEMS’
THEN Go_Block(’CUSTOMERS’);
ELSIF curblk = ’CUSTOMERS’
THEN Go_Block(’ORDERS’);
END IF;
END;

SYSTEM.CURSOR_ITEM

Determining current item using System.Cursor_Item in Oracle Forms. SYSTEM.CURSOR_ITEM represents the name of the block and item, block.item, where the input focus (cursor) is located.The value is always a character string.

Usage Notes
Within a given trigger, the value of SYSTEM.CURSOR_ITEM changes when navigation takes place. This differs from SYSTEM.TRIGGER_ITEM, which remains the same from the beginning to the end of single trigger.

SYSTEM.CURSOR_ITEM examples
Assume that you want to create a user-defined procedure that takes the value of the item where the cursor is located (represented by SYSTEM.CURSOR_VALUE), then multiplies the value by a constant, and then reads the modified value into the same item. The following user-defined procedure uses the COPY built-in to perform this function.
 
PROCEDURE CALC_VALUE IS
new_value NUMBER;
BEGIN
new_value := TO_NUMBER(:System.Cursor_Value) * .06;
Copy(TO_CHAR(new_value), :System.Cursor_Item);
END;

View Oracle Developer Handbook at Amazon.com 


hospip.JPG
### Drain Current in Electronics and Semiconductors In the context of field-effect transistors (FETs), particularly metal–oxide–semiconductor FETs (MOSFETs), **drain current** refers to the electrical current flowing from the source terminal through the channel region towards the drain terminal when a voltage is applied between these two points[^1]. This phenomenon plays an essential role in determining how effectively such devices can amplify signals or switch electronic circuits on and off. The magnitude of this current depends upon several factors including gate-source voltage (\(V_{GS}\)), threshold voltage (\(V_T\)), as well as physical dimensions like length \(L\) and width \(W\) of the conducting path within the device structure. For instance, increasing either \(W\) or reducing \(L\) generally leads to higher values of maximum possible drain currents because it increases effective cross-sectional area available for charge carriers' movement while decreasing resistance encountered along their way[^2]. Moreover, understanding subthreshold conduction becomes crucial at low operating voltages where small changes around \(V_T\) significantly impact performance metrics related not only to speed but also power consumption characteristics exhibited by modern integrated circuit designs utilizing advanced nanometer-scale technologies[^3]. ```python import numpy as np def calculate_drain_current(Vgs, Vt, W, L): """ A simplified function demonstrating calculation of drain current. Parameters: Vgs : float Gate-to-source voltage. Vt : float Threshold voltage. W : float Width of the transistor's channel. L : float Length of the transistor's channel. Returns: I_d : float Calculated drain current value based on given parameters. """ mu = 0.04 * 1e-4 # Mobility factor example value Cox = 3.9 * 8.854e-14 # Oxide capacitance per unit area if Vgs > Vt: gamma = (mu * Cox * W / L) Id = gamma * ((Vgs - Vt)**2) else: Id = 0 return Id ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值