有关QlikView循环的疑惑
问题描述: 查阅了QlikView的help后知道QlikView的循环语法如下面Code所示: LET vTest1 = 1;LET vTest2 = 30;DO WHILE (vTest1 $(vTest2))LET vTest1 = $(vTest1) + 1;LOOP 可是令人不解的是为何把DO WHILE (vTest1 $(vTest2))替换成下面的方式后就变成死循
问题描述:查阅了QlikView的help后知道QlikView的循环语法如下面Code所示:
LET vTest1 = 1; LET vTest2 = 30; DO WHILE (vTest1 < $(vTest2)) LET vTest1 = $(vTest1) + 1; LOOP
DO WHILE ($(vTest1) < $(vTest2))。
Google了很多次,只是说在while条件只会被编译一次,而循环中的所有值都会在每一次循环中都被解析。
原文是这样的:Each condition is interpreted only the first time it is encountered but is evaluated for every time it encountered in the loop.
因此上面的条件就变成这样 DO WHILE (1 < 30)一直成立。
解决方法:1. 在while条件里面不使用dollar sign,像这样DO WHILE (vTest1 < $(vTest2));
2. 在loop(循环)语句中使用EXIT DO WHEN如下:
LET vTest1 = 1; LET vTest2 = 30; DO WHILE ($(vTest1) < $(vTest2)) LET vTest1 = $(vTest1) + 1; EXIT DO WHEN ($(vTest1) >= $(vTest2)); LOOP
为何QklikView只会对条件编译一次?

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The clustering effect evaluation problem in the clustering algorithm requires specific code examples. Clustering is an unsupervised learning method that groups similar samples into one category by clustering data. In clustering algorithms, how to evaluate the effect of clustering is an important issue. This article will introduce several commonly used clustering effect evaluation indicators and give corresponding code examples. 1. Clustering effect evaluation index Silhouette Coefficient Silhouette coefficient evaluates the clustering effect by calculating the closeness of the sample and the degree of separation from other clusters.

Known for its powerful performance and versatile features, the iPhone is not immune to the occasional hiccup or technical difficulty, a common trait among complex electronic devices. Experiencing iPhone problems can be frustrating, but usually no alarm is needed. In this comprehensive guide, we aim to demystify some of the most commonly encountered challenges associated with iPhone usage. Our step-by-step approach is designed to help you resolve these common issues, providing practical solutions and troubleshooting tips to get your equipment back in peak working order. Whether you're facing a glitch or a more complex problem, this article can help you resolve them effectively. General Troubleshooting Tips Before delving into specific troubleshooting steps, here are some helpful

To solve the problem that jQuery.val() cannot be used, specific code examples are required. For front-end developers, using jQuery is one of the common operations. Among them, using the .val() method to get or set the value of a form element is a very common operation. However, in some specific cases, the problem of not being able to use the .val() method may arise. This article will introduce some common situations and solutions, and provide specific code examples. Problem Description When using jQuery to develop front-end pages, sometimes you will encounter

The generalization ability of machine learning models requires specific code examples. With the development and application of machine learning becoming more and more widespread, people are paying more and more attention to the generalization ability of machine learning models. Generalization ability refers to the prediction ability of a machine learning model on unlabeled data, and can also be understood as the adaptability of the model in the real world. A good machine learning model should have high generalization ability and be able to make accurate predictions on new data. However, in practical applications, we often encounter models that perform well on the training set, but fail on the test set or real

Lambda expression breaks out of the loop, specific code examples are needed. In programming, the loop structure is an important syntax that is often used. However, in certain circumstances, we may want to break out of the entire loop when a certain condition is met within the loop body, rather than just terminating the current loop iteration. At this time, the characteristics of lambda expressions can help us achieve the goal of jumping out of the loop. Lambda expression is a way to declare an anonymous function, which can define simple function logic internally. It is different from an ordinary function declaration,

What are the questions involved in the Yulong 8 Wine Master exam? What is the corresponding answer? How to pass the exam quickly? There are many questions that need to be answered in the Master of Wine Examination activities, and we can refer to the answers to solve them. These questions all involve knowledge of wine. If you need a reference, let’s take a look at the detailed analysis of the answers to the Yakuza 8 Wine Master exam questions! Detailed explanation of answers to questions in the Rulong 8 Wine Master exam 1. Questions about "wine". This is a distilled liquor produced by a distillery established by the royal family. It is brewed from the sugar of sugarcane grown in large quantities in Hawaii. What is the name of this wine? Answer: Rum 2. Question about "wine". The picture shows a drink made from dry ginseng and dry vermouth. It is characterized by the addition of olives and is known as "cockney"

The problem of reward design in reinforcement learning requires specific code examples. Reinforcement learning is a machine learning method whose goal is to learn how to take actions that maximize cumulative rewards through interaction with the environment. In reinforcement learning, reward plays a crucial role. It is a signal in the learning process of the agent and is used to guide its behavior. However, reward design is a challenging problem, and reasonable reward design can greatly affect the performance of reinforcement learning algorithms. In reinforcement learning, rewards can be thought of as the agent versus the environment

Speech Fluency Issues and Code Examples in Speech Synthesis Technology Introduction: Speech synthesis technology is a complex task involving speech signal processing, natural language processing and machine learning. One of the speech fluency issues refers to whether the generated synthetic speech sounds natural, smooth, and coherent. This article will discuss the speech fluency problem in speech synthesis technology and provide some sample code to help readers better understand this problem and its solution. 1. Causes of speech fluency problems: Speech fluency problems may be caused by the following factors:
