set verify on/off

本文介绍 SQL Plus 中 SET VERIFY 命令的作用及用法。通过此命令可以控制带有替代变量(以 & 或 && 开头)的 SQL 语句在执行前后是否显示其变化。文章还解释了如何启用或禁用此功能。

The   SET   VERIFY   command   is   used   to   turn   on   and   off   the   display   of   command   lines   that   have   had   substitutions   performed.   
    
  ON     turns   the   display   of   the   changed   lines   on.     This   is   the   default   value.   
    
  OFF   turns   the   display   of   changed   lines   off.   
    
  VER   added   with   version   9i.   

 

当在sqlplus中运行的sql语句中有替代变量(以&或&&打头)的时候,   
  set   verify(或ver)   on/off可以设置是否显示替代变量被替代前后的语句。   
  如:   
  SQL>   set   ver   on;   
  SQL>   select   *   from   dual   where   1=&var;   
  Enter   value   for   var:   1   
  old       1:   select   *   from   dual   where   1=&var   
  new       1:   select   *   from   dual   where   1=1   
    
  DU   
  --   
  X   
    
  而如果设为off,则显示如下:   
  SQL>   set   ver   off;   
  SQL>     select   *   from   dual   where   1=&var;   
  Enter   value   for   var:   1   
    
  DU   
  --   
  X   
    
  使用以&和&&开头的替代变量的前提是set   define   on;(不过这是缺省状态)。   

LED Brightness Control with Push Buttons Objective: Design and implement an embedded system using the Nucleo L432KC board and Mbed that allows users to control the brightness of an LED using push buttons. One button will increase the brightness, and the other button will decrease it. Show the demo to the GTA. What you will need: 1 x Nucleo L432KC development board 1 x LED 2 x Push buttons Resistors (if required for LED current limiting and/or for push buttons to pull up or down) Breadboard and jumper wires Setup: Connect an LED to the Nucleo L432KC board's pin. Connect two push buttons to the pins for brightness control. Initialisation: Define a PWM output for controlling LED brightness (led1). Define digital inputs for the two push buttons (button and button2). Main Program: Implement a loop to continuously monitor the state of the push buttons. When one button is pressed, set a flag to indicate the desired action (increase or decrease brightness). Adjust LED brightness gradually based on the button press: oIf the first button is pressed, increase brightness gradually. oIf the second button is pressed, decrease brightness gradually. oIf no button is pressed, toggle the LED on/off. Gradual Brightness Change: Use a loop to increment or decrement the LED brightness gradually. Use thread_sleep_for() to introduce delays for a smooth brightness transition. Testing: Test the functionality by pressing the buttons and observing the LED brightness changes. Verify that the LED turns on/off when no button is pressed. Documentation: Document the circuit connections, code explanation, and any observations during testing. Take note of any challenges faced and how they were resolved.
03-19
testcase DLC_BSDLight_001() { /************************/ /* HEADER */ /************************/ Header("BSDLight_FuctionTest: Check ON/OFF function and errorStatus update when DCU Wake up normal",//Title "DLC_BSDLight_001",//TCname "MGZ_LEO_DCM_DLC_001 & MGZ_LEO_DCM_DLC_002",//Req "Checking that BSDLiLeSts & BSDLiErrStsLe when DCU Wake up normal and Turn on/off BSD Light of DDM",//Notes "DLC;BSD_Light;Negtive Case",//Labels "Set system voltage is NVM=12V AND Wake_up DCU",//Preconditions "Turn on/off by Set BSDLiLeReq = 1/0,Then Check BSDLiLeSts & BSDLiErrStsLe",//Actions "Check BSDLiLeSts = 0x1 (on)||0x0 (off) and BSDLiErrStsLe = 0x0 (No error)",//ExpectRes "SwitchOff"//Postconditions ); /************************/ /* PRE-CONDITIONS */ /************************/ StartLog("DLC_BSDLight_001"); INIT_OF_TEST_CASE(); /*Check init status*/ TestStep("DLC_BSDLight_001.1","Swith Power-On & Wake_up DCU, Check DCU init_status"); testWaitForSignalMatch(BSDLiLeSts, 0, 100); testWaitForSignalMatch(BSDLiErrStsLe, 0, 100); /************************/ /* ACTIONS */ /************************/ TestStep("DLC_BSDLight_001.2", "VERIFICATION : Verify if BSDLiLeSts = 0x01(On) AND BSDLiErrStsLe = 0x0 (No error)"); setSignal(BSDLiLeReq, 1); if (testWaitForSignalMatch(BSDLiLeSts,1,500)==1) { testStepPass("DLC_BSDLight_001.2.1", "RESULT : The CAN signal BSDLiLeSts == ON, as expected.\nBSDLiLeSts = %d", (int)getSignal(BSDLiLeSts)); } else { testStepFail("DLC_BSDLight_001.2.2", "RESULT : The CAN signal BSDLiLeSts != ON, as NOT expected.\nBSDLiLeSts = %d", (int)getSignal(BSDLiLeSts)); } testWaitForTimeout(100); //check another condition if (testWaitForSignalMatch(BSDLiErrStsLe,0,500)==1) { testStepPass("DLC_BSDLight_001.2.3", "RESULT : The CAN signal BSDLiErrStsLe == 0x0 (No error), as expected.\nBSDLiErrStsLe = %d", (int)getSignal(BSDLiErrStsLe)); } else { testStepFail("DLC_BSDLight_001.2.4", "RESULT : The CAN signal BSDLiErrStsLe != 0x0 (No error), as NOT expected.\nBSDLiErrStsLe = %d", (int)getSignal(BSDLiErrStsLe)); } TestStep("DLC_BSDLight_001.3", "VERIFICATION : Verify if BSDLiLeSts = 0x00(off) AND BSDLiErrStsLe = 0x0 (No error)"); setSignal(BSDLiLeReq, 0); if (testWaitForSignalMatch(BSDLiLeSts,0,500)==1) { testStepPass("DLC_BSDLight_001.3.1", "RESULT : The CAN signal BSDLiLeSts == OFF, as expected.\nBSDLiLeSts = %d", (int)getSignal(BSDLiLeSts)); } else { testStepFail("DLC_BSDLight_001.3.2", "RESULT : The CAN signal BSDLiLeSts != OFF, as NOT expected.\nBSDLiLeSts = %d", (int)getSignal(BSDLiLeSts)); } testWaitForTimeout(100);//check another condition if (testWaitForSignalMatch(BSDLiErrStsLe,0,500)==1) { testStepPass("DLC_BSDLight_001.3.3", "RESULT : The CAN signal BSDLiErrStsLe == 0x0 (No error), as expected.\nBSDLiErrStsLe = %d", (int)getSignal(BSDLiErrStsLe)); } else { testStepFail("DLC_BSDLight_001.3.4", "RESULT : The CAN signal BSDLiErrStsLe != 0x0 (No error), as NOT expected.\nBSDLiErrStsLe = %d", (int)getSignal(BSDLiErrStsLe)); } TestStep("DLC_BSDLight_005.4", "VERIFICATION : Verify if BSDLiLeSts turn 0x02(Flash) to 0x01(on)"); setSignal(BSDLiLeReq, 2); testWaitForTimeout(500); setSignal(BSDLiLeReq, 1); if (testWaitForSignalMatch(BSDLiLeSts,1,500)==1) { testStepPass("DLC_BSDLight_005.4.1", "RESULT : The CAN signal BSDLiLeSts == ON, as expected.\nBSDLiLeSts = %d", (int)getSignal(BSDLiLeSts)); } else { testStepFail("DLC_BSDLight_005.4.2", "RESULT : The CAN signal The CAN signal BSDLiLeSts != ON, as NOT expected.\nBSDLiLeSts = %d", (int)getSignal(BSDLiLeSts)); } /************************/ /* POST-CONDITIONS */ /************************/ TestStep("DLC_BSDLight_001.4", "Rlease Init_Condition"); setSignal(BSDLiLeReq,0); END_OF_TEST_CASE(); StopLog(); }你是一位CAPL小白,帮我解释这段代码
最新发布
09-02
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值